Thursday, March 26, 2026

Peirce's Law in Egel

 Like Scheme, Egel has a trivial inhabitant of Peirce's Law ((p->q)->p)->p too.

def peirce = [F -> try F [X -> throw X] catch [X -> X]]

The combinator peirce has Peirce's law as type and takes as an argument a function F of type (p->q)->p and we feed that function another function of type p->q that throws its argument X of type p to the outer scope.

Utter bullshit, of course. 

No comments:

Post a Comment