Skip to content

Instantly share code, notes, and snippets.

View rexim's full-sized avatar
📺
https://twitch.tv/tsoding

Alexey Kutepov rexim

📺
https://twitch.tv/tsoding
View GitHub Profile
@rexim
rexim / example.ml
Created April 14, 2016 17:02 — forked from Minoru/example.ml
OCamlin' along with @rexim
let on f g = fun x y -> f (g x) (g y)
# uncurry from https://thelema.github.io/batteries-included/hdoc/BatPervasives.html
# dunno if you can use that
# line 15 can't be rewritten like that.
# I'm still trying to come up with another solution, but it's really different from the other two
# line 16
List.map (fun (vx, vy) -> atan2 (float_of_int vy) (float_of_int vx))