Follow

Raku's junctions reconstructed in , and then again in Raku. A sneak preview:

data JType = Any | All | One | None
data Junction a = Junction JType [a]

(•○) :: (a -> b) -> Junction a -> Junction b
(○•) :: Junction (b -> c) -> b -> Junction c
(○○) :: Junction (b -> c) -> Junction b -> Junction (Junction c)

so :: Junction Bool -> Bool

· · Web · 1 · 1 · 1

I wrote two new articles, both dealing with junctions in raku.
Junctions are these cool quantum superposition data types that result in auto-threaded computations.

But there is something odd about them, and that is the topic of my first article:

"The strange case of the greedy junction"

gist.github.com/wimvanderbauwh

Show thread

That article was just the starting point. Then I tried to account for this strange behaviour by deconstructing and then reconstructing theses junctions in sound statically typed terms. That is the (much longer) second article:

"Reconstructing Raku's Junctions"

gist.github.com/wimvanderbauwh


Show thread

Even if you don't care for Raku at all, I think these articles might be of interest as examples of functional programming in a language with gradual typing.

Show thread

Raku's community is awesome! I posted this yesterday, and today there is already a PR with an implementation of the proposed feature!

Show thread
Sign in to participate in the conversation
Octodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!