You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've developed a small application using containers, and found some functions that I missed:
CCFloat.round : float -> float – a version that returns an int would also be useful
CCVector.append_gen : 'a CCVector.vector -> 'a gen -> unit
CCList.{first, last} : 'a list -> 'a option
CCHashtbl.{to_gen, values_gen, keys_gen} – I guess these can't be implemented without using an intermediate list. They would still be nice to have so that I don't need to update my code when the standard library provides a more efficient way to implement them
The text was updated successfully, but these errors were encountered:
I implemented everything but the Hashtbl functions. It's indeed not efficiently implementable, and it's not much more verbose to write CCHashtbl.values_list |> Gen.of_list, which at least makes the cost explicit; even if/when the stdlib starts providing efficient versions, it will not be portable, so I'd advise to use Sequence for now.
Feel free to re-open if you disagree, I'm not totally opposed to it :-)
I've developed a small application using containers, and found some functions that I missed:
CCFloat.round : float -> float
– a version that returns an int would also be usefulCCVector.append_gen : 'a CCVector.vector -> 'a gen -> unit
CCList.{first, last} : 'a list -> 'a option
CCHashtbl.{to_gen, values_gen, keys_gen}
– I guess these can't be implemented without using an intermediate list. They would still be nice to have so that I don't need to update my code when the standard library provides a more efficient way to implement themThe text was updated successfully, but these errors were encountered: