<fluxm>
(c++) const is actually quite a nice feature when you do have mutability somewhere. there are some phantom-based implementations of those, but they obvously work only when the type in question has been built with support for them.
<fluxm>
I believe there are e.g. mutable/const string libraries out there with phantom types indicating access
bartholin has joined #ocaml
olle_ has joined #ocaml
wonko has quit [Ping timeout: 244 seconds]
Tuplanolla has joined #ocaml
wonko has joined #ocaml
wonko has quit [Ping timeout: 252 seconds]
leah2 has joined #ocaml
oriba has joined #ocaml
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bartholin has quit [Ping timeout: 252 seconds]
bastienleonard has joined #ocaml
bartholin has joined #ocaml
mro_ has joined #ocaml
mro has quit [Ping timeout: 272 seconds]
thinking-tower has joined #ocaml
thinking-tower has quit [Client Quit]
zebrag has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mro_ has quit [Remote host closed the connection]
mro has joined #ocaml
berberman_ has joined #ocaml
berberman has quit [Ping timeout: 272 seconds]
dhil has joined #ocaml
bartholin has quit [Ping timeout: 256 seconds]
dhil has quit [Ping timeout: 272 seconds]
bartholin has joined #ocaml
dhil has joined #ocaml
octocelly has joined #ocaml
octocelly has quit [Remote host closed the connection]
leah2 has quit [*.net *.split]
Tuplanolla has quit [*.net *.split]
yoctocell has quit [*.net *.split]
leah2 has joined #ocaml
Tuplanolla has joined #ocaml
mikess has joined #ocaml
mbuf has quit [Quit: Leaving]
bartholin has quit [Quit: Leaving]
pippijn has quit [Ping timeout: 252 seconds]
sadiq has quit [Ping timeout: 252 seconds]
vsiles has quit [Ping timeout: 252 seconds]
vsiles has joined #ocaml
sadiq has joined #ocaml
pippijn has joined #ocaml
zebrag has quit [Remote host closed the connection]
waleee has joined #ocaml
zebrag has joined #ocaml
zebrag has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
zebrag has joined #ocaml
olle_ has quit [Ping timeout: 252 seconds]
zebrag has quit [Remote host closed the connection]
yoctocell_ has joined #ocaml
yoctocell_ has quit [Client Quit]
yoctocell has joined #ocaml
olle_ has joined #ocaml
zebrag has joined #ocaml
olle_ has quit [Ping timeout: 268 seconds]
mikess has quit [Ping timeout: 264 seconds]
wingsorc has joined #ocaml
TheLemonMan has joined #ocaml
mikess has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
zebrag has quit [Remote host closed the connection]
bastienleonard has quit [Ping timeout: 244 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
bastienleonard has joined #ocaml
bartholin has quit [Ping timeout: 245 seconds]
mro has joined #ocaml
waleee has joined #ocaml
mro has quit [Quit: Leaving...]
waleee has quit [Ping timeout: 244 seconds]
bartholin has joined #ocaml
koorogi has left #ocaml [WeeChat 3.1]
waleee has joined #ocaml
gareppa has joined #ocaml
olle has joined #ocaml
<olle>
Is there a map function that takes the current list item *and* the previous one?
<olle>
I want to filter by predicate depending on previous item in a sorted list.
<thizanne>
olle: there isn't "as is", but you can do that with a fold
<thizanne>
something like List.fold_right (fun current (previous, result) -> if predicate previous elem then (current, current :: result) else (current, result))