Skip to content

Instantly share code, notes, and snippets.

@fwgreen
Last active June 27, 2023 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fwgreen/b874c0a925ef49053475694cdb715206 to your computer and use it in GitHub Desktop.
Save fwgreen/b874c0a925ef49053475694cdb715206 to your computer and use it in GitHub Desktop.
let suffix n xs = List.toSeq xs |> Seq.skip (xs.Length - n) |> Seq.toList
let removeLast n xs = List.toSeq xs |> Seq.rev |> Seq.removeManyAt 0 n |> Seq.rev |> Seq.toList
let span fn xs = (List.takeWhile fn xs, List.skipWhile fn xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment