egison v4.1.0 Release Notes
Release Date: 2020-10-14 // over 3 years ago-
๐ New Features
- โ Enabled user-defined infixes for expressions and patterns: https://egison.readthedocs.io/en/latest/reference/basic-syntax.html#infix-declaration
- ๐ Allowed
let
expression to decompose data. Unlikematch
expressions (of Egison), this does not require matchers and the decomposition pattern is limited.> let (x :: _) := [1, 2, 3] in x 1 > let (x :: _) := [] in x Primitive data pattern match failed stack trace: <stdin>
- Enabled data decomposition at lambda arguments.
> (\(x, _) -> x) (1, 2) 1
- Implemented partial application.
> let add x y := x + y in map (add 1) [1, 2, 3] [2, 3, 4]
- Huge speedup in mathematical programs:
- Reimplemented math normalization, which was originally implemented in Egison, to the interpreter in Haskell.
- Implemented lazy evaluation on tensor elements.
- โ Added new syntax for symmetric / anti-symmetric tensors.
Backward-incompatible Changes
๐ Changed the syntax to start definitions with
def
keyword.def x := 1
io
was previously defined as a syntastic constructs, but it is changed into a primitive function. Namely, users will need to wrap the arguments toio
in a parenthesis, or insert$
afterio
.-- Invalid io isEof ()
-- OK io (isEOF ()) io $ isEOF ()
### Miscellaneous * โ Added a command line option `--no-normalize` to turn off math normalization implemented in the standard math library. * โ Revived TSV input options: <https://egison.readthedocs.io/en/latest/reference/command-line-options.html#reading-tsv-input> * ๐ Deprecated `redefine`.