Interface Applicable

All Superinterfaces:
Describable
All Known Subinterfaces:
Codes.Positioned
All Known Implementing Classes:
Applicable2, Applicable3, ApplicableImpl, Closure, Codes.InteractUse, Codes.ListHd, Codes.ListLast, Codes.ListNth, Codes.ListTabulate, Codes.ListTake, Codes.ListTl, Codes.OptionValOf, Codes.RealCheckFloat, Codes.RealCompare, Codes.RealSign, Codes.RelationalOnly, Codes.StringConcat, Codes.StringConcatWith, Codes.StringExtract, Codes.StringSub, Codes.StringSubstring, Codes.VectorUpdate

public interface Applicable extends Describable
A compiled expression that can be evaluated by applying to an argument.

Similar to Code but more efficient, because it does not require creating a new runtime environment.

  • Method Summary

    Modifier and Type
    Method
    Description
    apply(EvalEnv env, Object argValue)
     
    default Code
    Converts this Applicable to a Code that has similar effect (but is less efficient).

    Methods inherited from interface net.hydromatic.morel.eval.Describable

    describe
  • Method Details

    • apply

      Object apply(EvalEnv env, Object argValue)
    • asCode

      default Code asCode()
      Converts this Applicable to a Code that has similar effect (but is less efficient).