Skip to content

Instantly share code, notes, and snippets.

@killerswan
Forked from mneedham/gist:941892
Created April 26, 2011 07:04
Show Gist options
  • Save killerswan/941923 to your computer and use it in GitHub Desktop.
Save killerswan/941923 to your computer and use it in GitHub Desktop.
Purely Functional Data Structures - Chris Okasaki
let suffixesTR list =
let rec loop l acc =
match l with
| [] -> acc
| hd::tl -> loop tl (List.concat [acc; [l]])
in
loop list []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment