#monadic

2023-03-19

Ever wanted to use #Rust to manipulate images like iterators?

image
.map(to_rgb)
.filter(|r, g, b| b > 100)
.collect();

Well, I don't quite have that, but I do have a #monadic-ish library called #obraztam.

framagit.org/dcz/obraztam

It's #immutable-first, it has .map() and .zip() and it optimizes to #SIMD instructions. Can be easily parallelized even more.

I used it to detect #laser beams in the picture!

#graphics #monad #iterator

2021-04-09

How do you turn k*n 2d list l (vector) to n*k 2d list?
You make a #recursive call
One way to get somewhat reliable answer is refining the type of l till its precise and do a case expression search in #idris which happens by #monadic plumbing

2020-10-24

#monadic bind is blocking (it needs the result in case it has to branch on it)
So #applicative if I need || calls

2020-10-24

#monadic bind is blocking (it needs the result in case it has to branch on it)
So #applicative if I need || calls

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst