Skip to content

Is there a reason to prefer the foreign/coerced representation to Church encoding? #5

@garyb

Description

@garyb

I guess it save the allocation of one lambda? Just wondered if there were any other reasons to prefer the current version.

For reference, I'm talking about this as the alternative:

newtype Fxists f = Fxists ( r. ( a. f a  r)  r)

mkFxists   f a. f a  Fxists f
mkFxists fa = Fxists (\f → f fa)

runFxists   f r. ( a. f a  r)  Fxists f  r
runFxists elim (Fxists f) = f elim

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: documentationImprovements or additions to documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions