View Source Jx (Jx v0.3.0)
This is the documentation for the Jx framework project.
Link to this section Summary
Link to this section Functions
Makes the match expression following it "jacked" allowing 'j' prefixed variables to be bound to functions.
Under the hood a call is introduced to a function that implements the specific logic to handle the expresssion.
The expression is passed to the implementing function in quoted form but with with any 'j' prefixed variables
being called as functions such as
jx.(...) replaced with
j(...) function calls.
iex> require Jx; import Jx iex> j a = 1 #Jx<a=1>
iex> require Jx; import Jx iex> j [[2, 0, a, b], [1, a, b]] = [jx.(2023), jx.(123)] #Jx<a=2, b=3, jx=&Integer.digits/1> iex> jx.(a * 10 + b) [2, 3]