Module aya.base

Interface Nested<Param,Term,This extends Nested<Param,Term,This>>

All Known Implementing Classes:
Expr.Lambda, Expr.Let, Expr.Pi

public interface Nested<Param,Term,This extends Nested<Param,Term,This>>
A Nested structure is something consists of a head and a body, for example:

A Nested class is supposed to also be a Nested

  • Method Summary

    Modifier and Type
    Method
    Description
    The body of a nested structure
    static <Param, Term, This extends Nested<Param, Term, This>>
    @NotNull kala.tuple.Tuple2<kala.collection.immutable.ImmutableSeq<Param>,Term>
    destructNested(This nested)
     
    The head of a nested structure.
    default This
    The nested body of a nested structure
  • Method Details

    • param

      @NotNull Param param()
      The head of a nested structure. It looks like a parameter of a lambda expression, so I call it "param".
    • body

      @NotNull Term body()
      The body of a nested structure
    • tryNested

      @Nullable default This tryNested()
      The nested body of a nested structure
      Returns:
      null if the body is not Nested
      Implementation Requirements:
      tryNested == null || tryNested == body
    • destructNested

      @NotNull static <Param, Term, This extends Nested<Param, Term, This>> @NotNull kala.tuple.Tuple2<kala.collection.immutable.ImmutableSeq<Param>,Term> destructNested(@NotNull This nested)