Dark | Light
[GUEST ACCESS MODE: Data is scrambled or limited to provide examples. Make requests using your API key to unlock full data. Check https://lunarcrush.ai/auth for authentication information.]

![fbrasisil Avatar](https://lunarcrush.com/gi/w:24/cr:twitter::793799617.png) Flavio Brasil [@fbrasisil](/creator/twitter/fbrasisil) on x 2735 followers
Created: 2025-07-16 13:33:07 UTC

Yes, the underlying ADT resembles the Freer monad but the overall abstraction has very different characteristics:

X. Effects are maintained in an unordered type-level set instead of an ordered list, which allows higher-order operations to wrap computations with arbitrary effect sets and introduce new effects without specifying their position in a stack.

X. ArrowEffect[Input[_], Output[_]] is more expressive than F[_], which enables suspending and resuming with other effects to support higher-order behavior.

X. Effect interpretation is constrained to its own suspensions instead of the more free interpretation approach where handlers can pattern match on any effect in the stack, which erodes strong reasoning about effect handling needed to implement higher-order effects. As a wise person once said, constraints liberate :)

Here's an example of Reader with a higher-order local:

Another example is Batch using higher-order sources with arbitrary effects:


XXX engagements

![Engagements Line Chart](https://lunarcrush.com/gi/w:600/p:tweet::1945476793814925429/c:line.svg)

**Related Topics**
[monad](/topic/monad)
[adt](/topic/adt)
[brasil](/topic/brasil)

[Post Link](https://x.com/fbrasisil/status/1945476793814925429)

[GUEST ACCESS MODE: Data is scrambled or limited to provide examples. Make requests using your API key to unlock full data. Check https://lunarcrush.ai/auth for authentication information.]

fbrasisil Avatar Flavio Brasil @fbrasisil on x 2735 followers Created: 2025-07-16 13:33:07 UTC

Yes, the underlying ADT resembles the Freer monad but the overall abstraction has very different characteristics:

X. Effects are maintained in an unordered type-level set instead of an ordered list, which allows higher-order operations to wrap computations with arbitrary effect sets and introduce new effects without specifying their position in a stack.

X. ArrowEffect[Input[], Output[]] is more expressive than F[_], which enables suspending and resuming with other effects to support higher-order behavior.

X. Effect interpretation is constrained to its own suspensions instead of the more free interpretation approach where handlers can pattern match on any effect in the stack, which erodes strong reasoning about effect handling needed to implement higher-order effects. As a wise person once said, constraints liberate :)

Here's an example of Reader with a higher-order local:

Another example is Batch using higher-order sources with arbitrary effects:

XXX engagements

Engagements Line Chart

Related Topics monad adt brasil

Post Link

post/tweet::1945476793814925429
/post/tweet::1945476793814925429