Jock Documentation
  • Introduction to Jock
  • Getting Started
  • Language Basics
  • Operators and Expressions
  • Functions
  • Control Flow
  • Data Structures
  • Classes and Objects
  • Compiler
  • Hoon Interface
  • Nock Interface
  • Language Reference
    • ASCII
  • Tutorial
Powered by GitBook
On this page
Export as PDF

Nock Interface

Raw Nock expressions may be evaluated as a subject/formula pair using eval.

eval (42 55) (0 2)      // results in 42

Besides writing raw Nock into nouns, statements trivially reducible to Nock are also available via language featuresin Jock:

  • Nock 0 (slot/address) is available as &.

  • Nock 1 (constant) is trivially available for literals.

  • Nock 2 (evaluate) is eval.

  • Nock 3 (cell check) is available as ?.

  • Nock 4 (increment) is directly available as +().

  • Nock 5 (equality) is available as ==.

  • Nock 6 (conditional) is available as if/else.

  • Nock 7 (compose) is available as the keyword pair compose/with.

  • Nock 8 (extend) is used in let as well as elsewhere.

  • Nock 9 is indirectly utilized in function calls.

  • Nock 10 is indirectly used.

  • Nock 11 likewise.

  • Nock 12 +mock scry hints are not supported.

PreviousHoon InterfaceNextLanguage Reference

Last updated 28 days ago