Comment

Comment by arocks

It seems `int_of_float` and `float_of_int` are deprecated by the Jane Streets Core library. It even throws errors on utop. I believe they need to be replaced by `Int.of_float` and `Float.of_int` respectively.

EDIT: Some more corrections:

1. `List.hd []` doesn't raise an error as its return type is an option. So the result is a `None`.

2. `List.map` and `List.filter` arguments should be reversed. First argument should be a list and the second should be the mapping function.

parent arocks 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton