Urbit Developers
  • Hoon

    • Overview
    • Cheat Sheet
    • Irregular forms
    • Hoon Errors
    • Hoon Style Guide
    • Basic Types
    • Advanced Types
    • Auras
    • Standard Library

      • 1a: Basic Arithmetic
      • 1b: Tree Addressing
      • 1c: Molds and Mold-Builders
      • 2a: Unit Logic
      • 2b: List Logic
      • 2c: Bit Arithmetic
      • 2d: Bit Logic
      • 2e: Insecure Hashing
      • 2f: Noun Ordering
      • 2g: Unsigned Powers
      • 2h: Set Logic
      • 2i: Map Logic
      • 2j: Jar and Jug Logic
      • 2k: Queue Logic
      • 2l: Container from Container
      • 2m: Container from Noun
      • 2n: Functional Hacks
      • 2o: Normalizing Containers
      • 2p: Serialization
      • 2q: Molds and Mold-Builders
      • 3a: Modular and Signed Ints
      • 3b: Floating Point
      • 3c: Urbit Time
      • 3d: SHA Hash Family
      • 3e: AES encryption (Removed)
      • 3f: Scrambling
      • 3g: Molds and Mold-Builders
      • 4a: Exotic Bases
      • 4b: Text Processing
      • 4c: Tank Printer
      • 4d: Parsing (Tracing)
      • 4e: Parsing (Combinators)
      • 4f: Parsing (Rule-Builders)
      • 4g: Parsing (Outside Caller)
      • 4h: Parsing (ASCII Glyphs)
      • 4i: Parsing (Useful Idioms)
      • 4j: Parsing (Bases and Base Digits)
      • 4k: Atom Printing
      • 4l: Atom Parsing
      • 4m: Formatting Functions
      • 4n: Virtualization
      • 4o: Molds
      • 5a: Compiler Utilities
      • 5b: Macro Expansion
      • 5c: Compiler Backend & Prettyprinter
      • 5d: Parser
      • 5e: Molds and mold builders
      • 5f: Profiling support
      • Runes

        • Atoms and strings
        • Nock . ('dot')
        • Wild ! ('zap')
        • Change Subject = ('tis')
        • Conditionals ? ('wut')
        • Cores | ('bar')
        • Arms + ('lus')
        • Cells : ('col')
        • Calls % ('cen')
        • Casts ^ ('ket')
        • Structures $ ('buc')
        • Make ; ('mic')
        • Hints ~ ('sig')
        • Imports / ('fas')
        • Terminators -- and ==
        • Limbs and wings

          • Limbs
          • Wings
          • Zuse

            • Table of Contents
            • 2d(1-5): To JSON, Wains
            • 2d(6): From JSON
            • 2d(7): From JSON (unit)
            • 2e(2-3): Print & Parse JSON
          • Arvo

            • Overview
            • Ames

              • Overview
              • Cryptography
              • API Reference
              • Scry Reference
              • Data Types
              • Behn

                • Overview
                • API Reference
                • Scry Reference
                • Examples
                • Clay

                  • Overview
                  • Architecture
                  • Using Clay
                  • Data Types
                  • Scry Reference
                  • API Reference
                  • Examples
                  • Marks

                    • Overview
                    • Writing Marks
                    • Using Marks
                    • Examples
                  • Dill

                    • Overview
                    • API Reference
                    • Scry Reference
                    • Data Types
                    • Eyre

                      • Overview
                      • External API Reference
                      • Internal API Reference
                      • Scry Reference
                      • Data Types
                      • Guide
                      • Gall

                        • Overview
                        • API Reference
                        • Data Types
                        • Threads Reference
                        • Iris

                          • Overview
                          • API Reference
                          • Data Types
                          • Example
                          • Jael

                            • Overview
                            • API Reference
                            • Scry Reference
                            • Data Types
                            • Examples
                            • Threads

                              • Overview
                              • HTTP API
                              • Reference
                              • Gall

                                • Start Thread
                                • Take Result
                                • Take Facts
                                • Stop Thread
                                • Poke Thread
                                • Examples

                                  • Fetch JSON
                                  • Child Thread
                                  • Main-loop
                                  • Poke Agent
                                  • Scry
                                  • Take Fact
                                • Concepts

                                  • Scries
                                  • Subscriptions
                                  • Tutorials

                                    • Move Trace
                                    • Reference

                                      • Cryptography
                                      • Filesystem Hierarchy
                                    • Nock

                                      • Nock Definition
                                      • Explanation
                                      • Example
                                      • Implementations
                                      • Vere

                                        • C Runtime System
                                        • Land of Nouns
                                        • API overview by prefix
                                        • C in Urbit
                                        • Writing Jets
                                        • Cryptography
                                        • Azimuth

                                          • Overview
                                          • Urbit HD Wallet
                                          • Azimuth Data Flow
                                          • Azimuth.eth
                                          • Ecliptic.eth
                                          • Advanced Azimuth Tools
                                          • Life and Rift
                                          • Layer 2

                                            • Layer 2 Overview
                                            • Layer 2 Actions
                                            • Transaction Format
                                            • Rollers
                                            • Roller HTTP RPC-API
                                            • Custom Roller Tutorial
                                          • Glossary

                                            • Agent
                                            • Ames
                                            • API
                                            • Aqua
                                            • Arm
                                            • Arvo
                                            • Atom
                                            • Aura
                                            • Aural ASCII
                                            • Azimuth
                                            • Battery
                                            • Behn
                                            • Bowl
                                            • Bridge
                                            • Bunt
                                            • Card
                                            • Case
                                            • Cask
                                            • Cell
                                            • Censures
                                            • Claims
                                            • Clay
                                            • Cold atom
                                            • Comet
                                            • Commit
                                            • Cons
                                            • Context
                                            • Cord
                                            • Core
                                            • Delegated Sending
                                            • Desk
                                            • Dill
                                            • Document Proposal
                                            • Dojo
                                            • Door
                                            • Double-boot
                                            • Dry Gate
                                            • Duct
                                            • Ecliptic
                                            • Entropy
                                            • Event Log
                                            • Eyre
                                            • Face
                                            • Fact
                                            • Foo Bar Baz
                                            • Galaxy
                                            • Gall
                                            • Garden
                                            • Gate
                                            • Generator
                                            • Gift
                                            • Glob
                                            • HD Wallet
                                            • Helm
                                            • Hood
                                            • Hoon
                                            • Invite Tree
                                            • Iris
                                            • Jael
                                            • Jet
                                            • Kelvin versioning
                                            • Kelvin versioning
                                            • Keyfile
                                            • Keywords
                                            • Khan
                                            • Kiln
                                            • Landscape
                                            • Leg
                                            • List
                                            • Loobean
                                            • Lull
                                            • Mark
                                            • Metals
                                            • Mold
                                            • Monad
                                            • Moon
                                            • Move
                                            • Nock
                                            • Noun
                                            • ~
                                            • OTA Updates
                                            • Path Prefix
                                            • Path
                                            • @p
                                            • Payload
                                            • Peek
                                            • pH
                                            • Pier
                                            • Pill
                                            • Planet
                                            • Poke
                                            • Proxies
                                            • Replay
                                            • Factory Reset
                                            • Roller
                                            • Naive rollups
                                            • Rune
                                            • Runtime
                                            • Sail
                                            • Sample
                                            • Scry
                                            • Senate
                                            • Ship
                                            • Slam
                                            • Spider
                                            • Star
                                            • String
                                            • Subject Oriented Programming
                                            • Subject
                                            • Subscription
                                            • Tape
                                            • Thread
                                            • Trap
                                            • Udon
                                            • Upgrade Proposal
                                            • Userspace
                                            • Vane
                                            • Vere
                                            • Voting
                                            • Warm atom
                                            • Wet Gate
                                            • Wing
                                            • Wire
                                            • Wrapper
                                            • ~zod
                                            • Zuse
                                            • Additional

                                              • Cryptography
                                              • Software Distribution

                                                • Overview
                                                • Docket File
                                                • Glob
                                                • Beacon

                                                  • Overview
                                                  • Subscriptions
                                                  • Scry Paths
                                                  • Types
                                                Urbit Developers
                                                • Hoon

                                                  • Overview
                                                  • Cheat Sheet
                                                  • Irregular forms
                                                  • Hoon Errors
                                                  • Hoon Style Guide
                                                  • Basic Types
                                                  • Advanced Types
                                                  • Auras
                                                  • Standard Library

                                                    • 1a: Basic Arithmetic
                                                    • 1b: Tree Addressing
                                                    • 1c: Molds and Mold-Builders
                                                    • 2a: Unit Logic
                                                    • 2b: List Logic
                                                    • 2c: Bit Arithmetic
                                                    • 2d: Bit Logic
                                                    • 2e: Insecure Hashing
                                                    • 2f: Noun Ordering
                                                    • 2g: Unsigned Powers
                                                    • 2h: Set Logic
                                                    • 2i: Map Logic
                                                    • 2j: Jar and Jug Logic
                                                    • 2k: Queue Logic
                                                    • 2l: Container from Container
                                                    • 2m: Container from Noun
                                                    • 2n: Functional Hacks
                                                    • 2o: Normalizing Containers
                                                    • 2p: Serialization
                                                    • 2q: Molds and Mold-Builders
                                                    • 3a: Modular and Signed Ints
                                                    • 3b: Floating Point
                                                    • 3c: Urbit Time
                                                    • 3d: SHA Hash Family
                                                    • 3e: AES encryption (Removed)
                                                    • 3f: Scrambling
                                                    • 3g: Molds and Mold-Builders
                                                    • 4a: Exotic Bases
                                                    • 4b: Text Processing
                                                    • 4c: Tank Printer
                                                    • 4d: Parsing (Tracing)
                                                    • 4e: Parsing (Combinators)
                                                    • 4f: Parsing (Rule-Builders)
                                                    • 4g: Parsing (Outside Caller)
                                                    • 4h: Parsing (ASCII Glyphs)
                                                    • 4i: Parsing (Useful Idioms)
                                                    • 4j: Parsing (Bases and Base Digits)
                                                    • 4k: Atom Printing
                                                    • 4l: Atom Parsing
                                                    • 4m: Formatting Functions
                                                    • 4n: Virtualization
                                                    • 4o: Molds
                                                    • 5a: Compiler Utilities
                                                    • 5b: Macro Expansion
                                                    • 5c: Compiler Backend & Prettyprinter
                                                    • 5d: Parser
                                                    • 5e: Molds and mold builders
                                                    • 5f: Profiling support
                                                    • Runes

                                                      • Atoms and strings
                                                      • Nock . ('dot')
                                                      • Wild ! ('zap')
                                                      • Change Subject = ('tis')
                                                      • Conditionals ? ('wut')
                                                      • Cores | ('bar')
                                                      • Arms + ('lus')
                                                      • Cells : ('col')
                                                      • Calls % ('cen')
                                                      • Casts ^ ('ket')
                                                      • Structures $ ('buc')
                                                      • Make ; ('mic')
                                                      • Hints ~ ('sig')
                                                      • Imports / ('fas')
                                                      • Terminators -- and ==
                                                      • Limbs and wings

                                                        • Limbs
                                                        • Wings
                                                        • Zuse

                                                          • Table of Contents
                                                          • 2d(1-5): To JSON, Wains
                                                          • 2d(6): From JSON
                                                          • 2d(7): From JSON (unit)
                                                          • 2e(2-3): Print & Parse JSON
                                                        • Arvo

                                                          • Overview
                                                          • Ames

                                                            • Overview
                                                            • Cryptography
                                                            • API Reference
                                                            • Scry Reference
                                                            • Data Types
                                                            • Behn

                                                              • Overview
                                                              • API Reference
                                                              • Scry Reference
                                                              • Examples
                                                              • Clay

                                                                • Overview
                                                                • Architecture
                                                                • Using Clay
                                                                • Data Types
                                                                • Scry Reference
                                                                • API Reference
                                                                • Examples
                                                                • Marks

                                                                  • Overview
                                                                  • Writing Marks
                                                                  • Using Marks
                                                                  • Examples
                                                                • Dill

                                                                  • Overview
                                                                  • API Reference
                                                                  • Scry Reference
                                                                  • Data Types
                                                                  • Eyre

                                                                    • Overview
                                                                    • External API Reference
                                                                    • Internal API Reference
                                                                    • Scry Reference
                                                                    • Data Types
                                                                    • Guide
                                                                    • Gall

                                                                      • Overview
                                                                      • API Reference
                                                                      • Data Types
                                                                      • Threads Reference
                                                                      • Iris

                                                                        • Overview
                                                                        • API Reference
                                                                        • Data Types
                                                                        • Example
                                                                        • Jael

                                                                          • Overview
                                                                          • API Reference
                                                                          • Scry Reference
                                                                          • Data Types
                                                                          • Examples
                                                                          • Threads

                                                                            • Overview
                                                                            • HTTP API
                                                                            • Reference
                                                                            • Gall

                                                                              • Start Thread
                                                                              • Take Result
                                                                              • Take Facts
                                                                              • Stop Thread
                                                                              • Poke Thread
                                                                              • Examples

                                                                                • Fetch JSON
                                                                                • Child Thread
                                                                                • Main-loop
                                                                                • Poke Agent
                                                                                • Scry
                                                                                • Take Fact
                                                                              • Concepts

                                                                                • Scries
                                                                                • Subscriptions
                                                                                • Tutorials

                                                                                  • Move Trace
                                                                                  • Reference

                                                                                    • Cryptography
                                                                                    • Filesystem Hierarchy
                                                                                  • Nock

                                                                                    • Nock Definition
                                                                                    • Explanation
                                                                                    • Example
                                                                                    • Implementations
                                                                                    • Vere

                                                                                      • C Runtime System
                                                                                      • Land of Nouns
                                                                                      • API overview by prefix
                                                                                      • C in Urbit
                                                                                      • Writing Jets
                                                                                      • Cryptography
                                                                                      • Azimuth

                                                                                        • Overview
                                                                                        • Urbit HD Wallet
                                                                                        • Azimuth Data Flow
                                                                                        • Azimuth.eth
                                                                                        • Ecliptic.eth
                                                                                        • Advanced Azimuth Tools
                                                                                        • Life and Rift
                                                                                        • Layer 2

                                                                                          • Layer 2 Overview
                                                                                          • Layer 2 Actions
                                                                                          • Transaction Format
                                                                                          • Rollers
                                                                                          • Roller HTTP RPC-API
                                                                                          • Custom Roller Tutorial
                                                                                        • Glossary

                                                                                          • Agent
                                                                                          • Ames
                                                                                          • API
                                                                                          • Aqua
                                                                                          • Arm
                                                                                          • Arvo
                                                                                          • Atom
                                                                                          • Aura
                                                                                          • Aural ASCII
                                                                                          • Azimuth
                                                                                          • Battery
                                                                                          • Behn
                                                                                          • Bowl
                                                                                          • Bridge
                                                                                          • Bunt
                                                                                          • Card
                                                                                          • Case
                                                                                          • Cask
                                                                                          • Cell
                                                                                          • Censures
                                                                                          • Claims
                                                                                          • Clay
                                                                                          • Cold atom
                                                                                          • Comet
                                                                                          • Commit
                                                                                          • Cons
                                                                                          • Context
                                                                                          • Cord
                                                                                          • Core
                                                                                          • Delegated Sending
                                                                                          • Desk
                                                                                          • Dill
                                                                                          • Document Proposal
                                                                                          • Dojo
                                                                                          • Door
                                                                                          • Double-boot
                                                                                          • Dry Gate
                                                                                          • Duct
                                                                                          • Ecliptic
                                                                                          • Entropy
                                                                                          • Event Log
                                                                                          • Eyre
                                                                                          • Face
                                                                                          • Fact
                                                                                          • Foo Bar Baz
                                                                                          • Galaxy
                                                                                          • Gall
                                                                                          • Garden
                                                                                          • Gate
                                                                                          • Generator
                                                                                          • Gift
                                                                                          • Glob
                                                                                          • HD Wallet
                                                                                          • Helm
                                                                                          • Hood
                                                                                          • Hoon
                                                                                          • Invite Tree
                                                                                          • Iris
                                                                                          • Jael
                                                                                          • Jet
                                                                                          • Kelvin versioning
                                                                                          • Kelvin versioning
                                                                                          • Keyfile
                                                                                          • Keywords
                                                                                          • Khan
                                                                                          • Kiln
                                                                                          • Landscape
                                                                                          • Leg
                                                                                          • List
                                                                                          • Loobean
                                                                                          • Lull
                                                                                          • Mark
                                                                                          • Metals
                                                                                          • Mold
                                                                                          • Monad
                                                                                          • Moon
                                                                                          • Move
                                                                                          • Nock
                                                                                          • Noun
                                                                                          • ~
                                                                                          • OTA Updates
                                                                                          • Path Prefix
                                                                                          • Path
                                                                                          • @p
                                                                                          • Payload
                                                                                          • Peek
                                                                                          • pH
                                                                                          • Pier
                                                                                          • Pill
                                                                                          • Planet
                                                                                          • Poke
                                                                                          • Proxies
                                                                                          • Replay
                                                                                          • Factory Reset
                                                                                          • Roller
                                                                                          • Naive rollups
                                                                                          • Rune
                                                                                          • Runtime
                                                                                          • Sail
                                                                                          • Sample
                                                                                          • Scry
                                                                                          • Senate
                                                                                          • Ship
                                                                                          • Slam
                                                                                          • Spider
                                                                                          • Star
                                                                                          • String
                                                                                          • Subject Oriented Programming
                                                                                          • Subject
                                                                                          • Subscription
                                                                                          • Tape
                                                                                          • Thread
                                                                                          • Trap
                                                                                          • Udon
                                                                                          • Upgrade Proposal
                                                                                          • Userspace
                                                                                          • Vane
                                                                                          • Vere
                                                                                          • Voting
                                                                                          • Warm atom
                                                                                          • Wet Gate
                                                                                          • Wing
                                                                                          • Wire
                                                                                          • Wrapper
                                                                                          • ~zod
                                                                                          • Zuse
                                                                                          • Additional

                                                                                            • Cryptography
                                                                                            • Software Distribution

                                                                                              • Overview
                                                                                              • Docket File
                                                                                              • Glob
                                                                                              • Beacon

                                                                                                • Overview
                                                                                                • Subscriptions
                                                                                                • Scry Paths
                                                                                                • Types
                                                                                              Reference/Hoon/Standard Library

                                                                                              2n: Functional Hacks

                                                                                              ++aftr

                                                                                              Pair after

                                                                                              +aftr first takes gate a, producing a wet gate. The new wet gate then takes b, producing the inverted pair of [b a]. This is the inverted version of +fore.

                                                                                              Accepts

                                                                                              a is a gate, and the sample of +aftr.

                                                                                              b is a gate, and the sample of (aftr a).

                                                                                              Produces

                                                                                              (pair b a).

                                                                                              Source

                                                                                              ++ aftr |*(a=$-(* *) |*(b=$-(* *) (pair b a)))

                                                                                              Examples

                                                                                              > =a (aftr @ud)
                                                                                              > `(a @t)`['foo' 42]
                                                                                              [p='foo' q=42]

                                                                                              ++cork

                                                                                              Compose forward

                                                                                              Call gate a, then call gate b with its product.

                                                                                              This is a wet gate that takes two gates and produces a new gate.

                                                                                              This is the inverse of ++corl.

                                                                                              Accepts

                                                                                              a is a gate.

                                                                                              b is a gate.

                                                                                              Source

                                                                                              ++ cork |*([a=$-(* *) b=$-(* *)] (corl b a))

                                                                                              Examples

                                                                                              > ((cork dec |=(a=@ [a a])) 20)
                                                                                              [19 19]
                                                                                              > ((cork dec some) 20)
                                                                                              [~ u=19]

                                                                                              ++corl

                                                                                              Compose backward

                                                                                              Call gate b, then call gate a with its product.

                                                                                              This is a wet gate that takes two gates and produces a new gate.

                                                                                              This is the inverse of ++cork.

                                                                                              Accepts

                                                                                              a is a gate.

                                                                                              b is a gate.

                                                                                              Source

                                                                                              ++ corl
                                                                                              |* [a=$-(* *) b=$-(* *)]
                                                                                              =< +:|.((a (b))) :: type check
                                                                                              =+ c=+<.b
                                                                                              |@ ++ $ (a (b c))
                                                                                              --

                                                                                              Examples

                                                                                              > ((corl |=(a=@ [a a]) dec) 20)
                                                                                              [19 19]
                                                                                              > ((corl some dec) 20)
                                                                                              [~ u=19]

                                                                                              ++curr

                                                                                              Right curry

                                                                                              Right-curry a gate, binding the tail of its sample

                                                                                              Accepts

                                                                                              a is a gate.

                                                                                              c is a noun.

                                                                                              Produces

                                                                                              A gate.

                                                                                              Source

                                                                                              ++ curr
                                                                                              |* [a=$-(^ *) c=*]
                                                                                              =+ b=+<+.a
                                                                                              |@ ++ $ (a b c)
                                                                                              --

                                                                                              Examples

                                                                                              > =tep (curr scan sym)
                                                                                              > `@t`(tep "asd")
                                                                                              'asd'
                                                                                              > `@t`(tep "lek-om")
                                                                                              'lek-om'

                                                                                              ++cury

                                                                                              Curry left

                                                                                              Curry a gate, binding the head of its sample

                                                                                              Accepts

                                                                                              a is a gate.

                                                                                              b is a noun.

                                                                                              Produces

                                                                                              A gate.

                                                                                              Source

                                                                                              ++ cury
                                                                                              |* [a=$-(^ *) b=*]
                                                                                              =+ c=+<+.a
                                                                                              |@ ++ $ (a b c)
                                                                                              --

                                                                                              Examples

                                                                                              > =mol (cury add 2)
                                                                                              > (mol 4)
                                                                                              6
                                                                                              > (mol 7)
                                                                                              9

                                                                                              ++fore

                                                                                              Pair before

                                                                                              +fore first takes gate a, producing a wet gate. The new wet gate then takes b, producing the pair of [a b].

                                                                                              Accepts

                                                                                              a is a gate, and is the sample of +fore.

                                                                                              b is a gate, and is the sample of (fore a).

                                                                                              Produces

                                                                                              (pair a b).

                                                                                              Source

                                                                                              ++ fore |*(a=$-(* *) |*(b=$-(* *) (pair a b)))

                                                                                              Examples

                                                                                              > =a (fore @ud)
                                                                                              > `(a @t)`[42 'foo']
                                                                                              [p=42 q='foo']

                                                                                              ++head

                                                                                              Get head

                                                                                              Produces the head of a cell.

                                                                                              Accepts

                                                                                              A cell.

                                                                                              Produces

                                                                                              A noun.

                                                                                              Source

                                                                                              ++ head |*(^ ,:+<-)

                                                                                              Examples

                                                                                              > (head [1 2])
                                                                                              1
                                                                                              > (head [[1 1] 2])
                                                                                              [1 1]
                                                                                              > (head "hello")
                                                                                              'h'

                                                                                              ++same

                                                                                              Identity

                                                                                              Produces the same value that it was given.

                                                                                              Accepts

                                                                                              A noun.

                                                                                              Produces

                                                                                              A noun.

                                                                                              Source

                                                                                              ++ same |*(* +<)

                                                                                              Examples

                                                                                              > (same [1 2])
                                                                                              [1 2]
                                                                                              > (same [[1 1] 2])
                                                                                              [[1 1] 2]
                                                                                              > (same "hello")
                                                                                              "hello"

                                                                                              ++succ

                                                                                              Successor

                                                                                              Increment an atom.

                                                                                              Accepts

                                                                                              An atom.

                                                                                              Produces

                                                                                              An atom.

                                                                                              Source

                                                                                              ++ succ |=(@ +(+<))

                                                                                              Examples

                                                                                              > (succ 1)
                                                                                              2

                                                                                              ++tail

                                                                                              Get tail

                                                                                              Produces the tail of a cell.

                                                                                              Accepts

                                                                                              A cell.

                                                                                              Produces

                                                                                              A noun.

                                                                                              Source

                                                                                              ++ tail |*(^ ,:+<+)

                                                                                              Examples

                                                                                              > (tail [1 2])
                                                                                              2
                                                                                              > (tail [[1 1] 2])
                                                                                              2
                                                                                              > (tail "hello")
                                                                                              "ello"

                                                                                              ++test

                                                                                              Test for equality

                                                                                              Checks if a and b are equal, producing a flag.

                                                                                              Accepts

                                                                                              a is a noun.

                                                                                              b is a noun.

                                                                                              Produces

                                                                                              A flag.

                                                                                              Source

                                                                                              ++ test |=(^ =(+<- +<+))

                                                                                              Examples

                                                                                              > (test 1 1)
                                                                                              %.y
                                                                                              > (test [2 0] 2)
                                                                                              %.n
                                                                                              > (test "hello" 'hello')
                                                                                              %.n
                                                                                              > (test "hello" ['h' 'e' 'l' 'l' 'o' ~])
                                                                                              %.y

                                                                                              ++lead

                                                                                              Put head

                                                                                              (lead a) produces a wet gate, then ((lead a) b) produces [a b].

                                                                                              Accepts

                                                                                              a is a noun, and is the sample of +lead.

                                                                                              b is a noun, and is the sample of ((lead a) b)

                                                                                              Produces

                                                                                              A cell of [a b].

                                                                                              Source

                                                                                              ++ lead |*(* |*(* [+>+< +<]))

                                                                                              Examples

                                                                                              > =a (lead 'foo')
                                                                                              > (a 'bar')
                                                                                              ['foo' 'bar']

                                                                                              ++late

                                                                                              Put tail

                                                                                              (late a) produces a wet gate, then ((late a) b) produces the inverted cell [b a]. This is the inverted version of +lead.

                                                                                              Accepts

                                                                                              a is a noun, and is the sample of +late.

                                                                                              b is a noun, and is the sample of (late a).

                                                                                              Produces

                                                                                              A cell of [b a].

                                                                                              Source

                                                                                              ++ late |*(* |*(* [+< +>+<]))

                                                                                              Examples

                                                                                              > =a (late 'foo')
                                                                                              > (a 'bar')
                                                                                              ['bar' 'foo']

                                                                                              <-

                                                                                              2m: Container from Noun

                                                                                              2o: Normalizing Containers

                                                                                              ->

                                                                                              Edit this page on GitHub

                                                                                              Last modified October 31, 2022