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.

https://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

dcz dcz / obraztam · GitLab

Framagit

GitLab
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
#monadic bind is blocking (it needs the result in case it has to branch on it)
So #applicative if I need || calls
#monadic bind is blocking (it needs the result in case it has to branch on it)
So #applicative if I need || calls