Skip to content

Pattern matching #14

Description

@dabernado

Functions should be able to be defined with pattern matching constraints and clauses. Example:

(defn unwrap
    ((ok x)    (x))
    ((err e)   (++ "Error: " e)))

Implementing this is going to require adding yet another clause to eval, and rewriting the given function's clauses to pattern match inside a single function body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions