Skip to content

Instantly share code, notes, and snippets.

@embix
Created April 12, 2019 06:52
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 embix/dff4381c220d31ce461120932e6ccbe6 to your computer and use it in GitHub Desktop.
Save embix/dff4381c220d31ce461120932e6ccbe6 to your computer and use it in GitHub Desktop.
let isEmpty (sc:IEnumerable<Char>) =
//Seq.isEmpty (sc)
sc.Contains('4')
let input =
Enumerable.Range(1,6)
|> Seq.map (fun (i) -> (i.ToString(),i))
|> Seq.map (fun (s,i) -> (s |> Seq.map id,i))
let output =
input
|> Seq.map (fun (sc,i) -> (sc, isEmpty(sc), i))
|> Seq.filter (fun (_,isempty,_) -> not isempty)
|> Seq.map (fun (sc,_,i) -> (sc,i))
// in linqpad use "F# Program"
input.Dump()
output.Dump()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment