Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not a synonym, but `Monad` is one of the commonly used interfaces in Haskell (not the only one).




OK I think I understand now, thank you. My takeaways:

1. Yes, Zig is doing basically the same thing as Haskell

2. No, it's not a monad in Zig because it's an imperative language.


It still is a monad. It's just Zig doesn't have language support for monads, so it's less ergonomic.

Just as modular addition over ints in Zig forms a group, even if Zig has no notion of groups. It's just a property of the construct.

Laziness has nothing to do with it.

What that means practically for Zig, I'm unsure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: