L4 Core Libraries
L4 ships with a set of core libraries that provide essential functions for common tasks. These libraries are written in L4 itself and serve as both utilities and examples of idiomatic L4 code.
Overview
Core libraries are located in the jl4-core/libraries/ directory:
- prelude - Standard functions (automatically imported)
- daydate - Date calculations and temporal logic
- excel-date - Excel date compatibility
- math - Mathematical functions
- currency - Currency handling (ISO 4217)
- legal-persons - Legal entity types and capacity
- jurisdiction - Jurisdiction definitions
- holdings - Holdings and ownership
- date-compat - Legacy DATE syntax compatibility
- llm - LLM API integration
Using Libraries
Libraries require explicit import:
IMPORT daydate
IMPORT math
IMPORT currency
Import Paths
Import by library name or file path:
IMPORT daydate -- Standard/core library
IMPORT "my-custom-lib.l4" -- Custom library
See Also
- GLOSSARY - Language feature index
- Types - Type system documentation
- IMPORT keyword - IMPORT keyword details
- Specs - Technical specifications