Skip to content

Conversation

@dominik-muc
Copy link
Member

No description provided.

@wojpok
Copy link
Collaborator

wojpok commented May 10, 2025

I like code improvements. Comments on the other hand are too excessive to my liking; for example there is no need to write such an elaborate explanation about what a Triples of Ints are.

@dominik-muc
Copy link
Member Author

This is an example — thus it's probably gonna be read by someone who is a beginner. The comment notices that this construction is actually represented as an ADT, which might not be so obvious.

@wojpok
Copy link
Collaborator

wojpok commented May 20, 2025

Arguably, this is the least beginner friendly example. The third definition introduces effects and explaining it in terms of continuation doesn't clarify much to beginners. Without experience in functional programming this is as unreadable as it might be.

Speaking of effects I have just noticed a error in explanation of BT:

Fail, on the other hand, returns some value of a type T.
T is a local existential type, which means that each instance of BT
will implement this with a specific type.

In fail : Unit ->[E] T type T is not really an existential type, value is never instantiated and never returned. On fail, both handlers discards continuation, which means that fail doesn't return and thus might be used in any context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants