Skip to content

Instantly share code, notes, and snippets.

@chribben
Created July 21, 2012 21:17
Show Gist options
  • Save chribben/3157217 to your computer and use it in GitHub Desktop.
Save chribben/3157217 to your computer and use it in GitHub Desktop.
Build lists using append and cons
let rec buildAppend (lst:int list) num =
if lst.Length < 30000 then
buildAppend (lst @ [num]) num
else
lst
let rec buildCons (lst:int list) num =
if lst.Length < 30000 then
buildCons (num::lst) num
else
List.rev lst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment