Skip to content

Syntax in the explanation #585

@iacore

Description

@iacore

I was reading https://github.com/HigherOrderCO/Kind1/blob/master/blog/1-beyond-inductive-datatypes.md, and there's one part I don't quite understand.

// Natural numbers                            
Nat: Type
  self(P: Nat -> Type) ->
  (zero: P(Nat.zero)) ->
  (succ: (pred: Nat) -> P(Nat.succ(pred))) ->
  P(self)

If it's like the code below, it makes sense to me.

// Natural numbers                            
Nat: Type
  (self : Nat) ->
  (P: Nat -> Type) ->
  (zero: P(Nat.zero)) ->
  (succ: (pred: Nat) -> P(Nat.succ(pred))) ->
  P(self)

So what is self?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions