Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Ocaml

Name: Anonymous 2010-10-07 14:26

So I've got an Ocaml assignment and I know shit about Ocaml. Wanna help a retard with his homework? I'll probably learn faster if I see examples. So, my tasks include:

1) Write a function that flattens a list of lists
2) Write a function that will count an object's occurences in a list
3) Define a function that will create a list containing a chosen number of duplicates of a certain object
4) Define a function that will square all numbers in a list
5) Write a function that will check if a list is a palindrome
6) Define a function that will return the length of a list
7) Define a function that will append two lists

Name: Anonymous 2010-10-08 6:08

J is so superiour for this shit


mapSquare =: *:
   mapSquare 1 2 3 4 5
1 4 9 16 25

5'th should have elegant solution but I can't go further than
isPalindrome =: (= |.)  because I'm weak with hooks,forks and other kitchenware and can't say how to pass result from it to */

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List