Skip to content

Commit

Permalink
Merge pull request #4 from azdavis/master
Browse files Browse the repository at this point in the history
Add Standard ML
  • Loading branch information
mtso authored Oct 23, 2017
2 parents 215f260 + e837e3b commit c9b94a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions standard-ml.sml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fun add (x : int) (y : int) : int =
x + y

fun each (xs : 'a list) (f : 'a -> 'b) : 'b list =
case xs of
[] => []
| x :: xs' => f x :: each xs' f

val 3 = add 1 2
val [2,3,4] = each [1,2,3] (fn x => x + 1)

0 comments on commit c9b94a7

Please # to comment.