Skip to content

Instantly share code, notes, and snippets.

@Ajwah
Last active August 29, 2015 14:21
Show Gist options
  • Save Ajwah/51412338988b508e55e9 to your computer and use it in GitHub Desktop.
Save Ajwah/51412338988b508e55e9 to your computer and use it in GitHub Desktop.
Print int list
val l2s = List.foldl (fn(e,acc)=> acc^" "^Int.toString(e)) ""
val ll2s = List.foldl (fn(e,acc)=>acc^"\n "^(l2s e)) ""
fun display [] = (print "\n END")
| display (l::lls) = (print ("\n "^(l2s l)); display lls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment