All notable changes to the Lea programming language are documented in this file.
The format is based on Keep a Changelog.
- Pipelines can start with spread pipe:
/>>> double /> sum- first stage can now be a spread operation
- Spread pipe in pipeline literals:
/>>>now works inside first-class pipeline literalslet p = /> filter((x) -> x > 0) />>> double /> sum- spread stages preserved for visualization
- Comprehensive standard library: 60+ new builtins including:
- Collection:
find,findIndex,some,every,sort,flatten,flatMap,last,drop,takeWhile,dropWhile,count,intersperse,enumerate,transpose - Statistics:
sum,product,mean,median,variance,stdDev - Number theory:
gcd,lcm,isPrime,factorial,fibonacci,isEven,isOdd,mod,divInt - Bitwise:
bitAnd,bitOr,bitXor,bitNot,bitShiftLeft,bitShiftRight - Regex:
regexTest,regexMatch,regexMatchAll,regexReplace,regexSplit - Case conversion:
toCamelCase,toPascalCase,toSnakeCase,toKebabCase,toConstantCase,capitalize,titleCase - Encoding:
base64Encode,base64Decode,urlEncode,urlDecode,hexEncode,hexDecode - Path utilities:
pathJoin,pathDirname,pathBasename,pathExtname,pathIsAbsolute - Environment:
cwd,platform
- Collection:
- Parser: Single-line parallel pipes in pipeline literals now work correctly
let p = /> double \> addOne \> square />>> fn- parallel branches collected properly on same line
- Parser: Async decorator application and parser context issues
- Module system with
#exportdecorator anduseimports - Pattern matching with
matchexpression and guards - Function overloading via
andkeyword with type-based dispatch - Reversible functions with forward (
->) and reverse (<-) definitions - Bidirectional pipelines (
</>) for encoding/decoding patterns - Reactive pipelines (
@>) with lazy evaluation and dirty tracking - Spread pipe operator (
/>>>) for mapping over list elements - Parallel pipe operator (
\>) for fan-out concurrent execution - Type annotations with trailing
:: Type :> ReturnTypesyntax - Strict mode via
#strictpragma or--strictCLI flag - Tuples as first-class values with destructuring
- Record spread operator (
...) for merging and extending records - List spread operator for concatenating lists
- Template strings with
{expr}interpolation - Early return with
returnkeyword - Codeblocks (
{-- label --}/{/--}) for code organization - Default parameters in function definitions
- Ignored parameters with underscore (
_)
#log- logs function inputs/outputs#log_verbose- detailed logging with types and timing#memo- result caching by arguments#time- execution time logging#retry(n)- retry on failure#timeout(ms)- async timeout handling#validate- runtime type checking#pure- side effect warnings#async- mark function as async#trace- deep logging with call depth#coerce(Type)- input type coercion#parse- auto-parse JSON/numbers from strings#stringify- convert output to string#tease(Type)- best-effort output coercion#export- export from module
- Pipeline as first-class values with
.length,.stages,.visualize() - Pipeline algebra:
.prepend(),.append(),.reverse(),.slice() - Set operations:
.without(),.intersection(),.union(),.concat() Pipeline.identity,Pipeline.empty,Pipeline.from()
- Math:
sqrt,abs,floor,ceil,round,min,max - List:
length,head,tail,push,concat,reverse,zip,isEmpty,take,at,partition,range - Higher-order:
map,filter,reduce(all with index access) - Tuple:
fst,snd - String:
split,lines,charAt,join,padEnd,padStart,trim,trimEnd,indexOf,includes,repeat,slice,chars - Set:
listSet,setAdd,setHas - Random:
random,randomInt,randomFloat,randomChoice,shuffle - I/O:
readFile,writeFile,appendFile,fileExists,deleteFile,readDir,fetch - Async:
delay,parallel,race,then,iterations - Utility:
print,toString,breakPieces(ASCII diagram parser)
- Mermaid flowchart visualization (
npm run visualize) - Prettier-style code formatter (
npm run format) - VS Code extension with syntax highlighting
- REPL with strict mode support
- Jest unit tests for lexer, parser, interpreter
- Integration tests in
tests/directory - CI workflow with test automation
- Replaced
<-early return syntax withreturnkeyword
- Improved pipeline type annotation highlighting for
:: [Int] /> [Int]
- Added
usekeyword highlighting for module imports - Added
#exportdecorator highlighting
- Added sticky scroll support for codeblocks
- Added Lea syntax highlighting in Markdown code blocks
- Added codeblock highlighting (
{-- --}/{/--}) - Added template string interpolation highlighting
- Added spread operator highlighting
- Added pattern matching highlighting
- Added parallel pipe operator highlighting