Skip to content

Instantly share code, notes, and snippets.

@sslotsky
Created January 7, 2019 17:21
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 sslotsky/e51da09b39f671465c68009a0d6648ee to your computer and use it in GitHub Desktop.
Save sslotsky/e51da09b39f671465c68009a0d6648ee to your computer and use it in GitHub Desktop.
let (captured, falling) =
List.partition(w => w.text == ui.input(), state.words);
let (crashed, remaining) = List.partition(w => w.y > ui.height, falling);
let newWords =
remaining |> List.map(word => {...word, y: word.y +. word.velocity});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment