Dokumentacija

Jedro in učinki

Vsak operator, ki ga program .lolo lahko pokliče, iz kanoničnega registra, ki ga prevajalnik vgradi.

Na tej strani

Imenski prostori na tej strani: /.

Jedro

!=

Not equal to

lolo
1 (!= a b)

Parametri

ImeTipOpis
aanyFirst value
banySecond value

Vrne: boolean

Primer

lolo
1 (!= 5 3) // => true

%

Modulo (remainder)

lolo
1 (% a b)

Parametri

ImeTipOpis
anumberDividend
bnumberDivisor

Vrne: number

Primer

lolo
1 (% 10 3) // => 1

*

Multiply numbers

lolo
1 (* a b)

Parametri

ImeTipOpis
anumberFirst number
bnumberSecond number (variadic)

Vrne: number

Primer

lolo
1 (* 3 4) // => 12

+

Add numbers

lolo
1 (+ a b)

Parametri

ImeTipOpis
anumberFirst number
bnumberSecond number (variadic)

Vrne: number

Primer

lolo
1 (+ 2 3) // => 5

-

Subtract or negate

lolo
1 (- a)

Parametri

ImeTipOpis
anumberNumber (variadic)

Vrne: number

Primer

lolo
1 (- 5) // => -5

/

Divide numbers

lolo
1 (/ a b)

Parametri

ImeTipOpis
anumberDividend
bnumberDivisor

Vrne: number

Primer

lolo
1 (/ 10 2) // => 5

<

Less than

lolo
1 (< a b)

Parametri

ImeTipOpis
anumberFirst number
bnumberSecond number

Vrne: boolean

Primer

lolo
1 (< 3 5) // => true

<=

Less than or equal

lolo
1 (<= a b)

Parametri

ImeTipOpis
anumberFirst number
bnumberSecond number

Vrne: boolean

Primer

lolo
1 (<= 5 5) // => true

=

Equal to

lolo
1 (= a b)

Parametri

ImeTipOpis
aanyFirst value
banySecond value

Vrne: boolean

Primer

lolo
1 (= 5 5) // => true

==

Equal to (canonical .lolo spelling)

lolo
1 (== a b)

Parametri

ImeTipOpis
aanyFirst value
banySecond value

Vrne: boolean

Primer

lolo
1 (== 5 5) // => true

>

Greater than

lolo
1 (> a b)

Parametri

ImeTipOpis
anumberFirst number
bnumberSecond number

Vrne: boolean

Primer

lolo
1 (> 5 3) // => true

>=

Greater than or equal

lolo
1 (>= a b)

Parametri

ImeTipOpis
anumberFirst number
bnumberSecond number

Vrne: boolean

Primer

lolo
1 (>= 5 5) // => true

and

Logical AND (returns the last truthy value, NOT a boolean — short-circuit)

lolo
1 (and a b)

Parametri

ImeTipOpis
abooleanFirst condition
bbooleanSecond condition (variadic)

Vrne: boolean

Primer

lolo
1 (and true true) // => true

atomic

Run effects as one server transaction: all succeed or all roll back

lolo
1 (atomic effects)

Parametri

ImeTipOpis
effects{'kind': 'sexpr'}The effects to group

Vrne: void · Teče na: server

Primer

lolo
1 (atomic (set @entity.x 10) (set @entity.y 20))

call-service

Invoke an external service action. Optional trailing { emit: { success, failure } } options object attaches closed-circuit emit routing (V2 frame contract).

lolo
1 (call-service service action)

Parametri

ImeTipOpis
servicestringService name
actionstringAction name (variadic)

Vrne: void · Teče na: server

Primer

lolo
1 (call-service "email" "send")

deref

Snapshot read of a binding or entity, without subscribing to changes

lolo
1 (deref target options)

Parametri

ImeTipOpis
targetstringA binding (@entity.health) or entity name
options{'kind': 'object', 'fields': {'id': 'string', 'filter': 'any', 'include': {'kind': 'array', 'of': 'string'}}, 'open': True}Selector: id | filter | include

Vrne: any · Teče na: any

Primer

lolo
1 (deref @entity.health)

despawn

Despawn an entity instance (games)

lolo
1 (despawn entityId)

Parametri

ImeTipOpis
entityIdstringTarget entity id (defaults to @entity.id)

Vrne: void · Teče na: any

Primer

lolo
1 (despawn)

do

Sequential execution of multiple effects/expressions

lolo
1 (do expr)

Parametri

ImeTipOpis
expranyExpression (variadic)

Vrne: any

Primer

lolo
1 (do (emit "DO_A") (emit "DO_B"))

emit

Emit an event onto the bus

lolo
1 (emit event)

Parametri

ImeTipOpis
eventstringEvent key (optional payload follows)

Vrne: void · Teče na: any

Primer

lolo
1 (emit "DO_UPDATE")

evaluate

Evaluate a model against test cases (ML effect)

lolo
1 (evaluate model)

Parametri

ImeTipOpis
modelobjectModel to evaluate

Vrne: object

Primer

lolo
1 (evaluate {"layers":[{"type":"dense","units":2}]} [{"input":[0],"expected":[1]}])

fetch

Fetch an entity (by id) or a collection (by filter) from persistence

lolo
1 (fetch query)

Parametri

ImeTipOpis
queryanyEntity ID or filter

Vrne: void · Teče na: server

Primer

lolo
1 (fetch "Task" {"id":"t1","emit":{"success":"TASK_LOADED"}})

fetch-stream

Stream an LLM or HTTP response, emitting on_message per chunk, success on completion, failure on error

lolo
1 (fetch-stream url)

Parametri

ImeTipOpis
urlstringEndpoint URL

Vrne: void · Teče na: server

Primer

lolo
1 (fetch-stream "https://api.example.com/stream")

fn

Lambda expression (used for per-item renders and transforms)

lolo
1 (fn param body)

Parametri

ImeTipOpis
paramstringParameter name
bodyanyLambda body

Vrne: function

Primer

lolo
1 (fn x (> @x.price 100))

forward

Run a forward pass through a model (ML effect)

lolo
1 (forward model input)

Parametri

ImeTipOpis
modelobjectNeural network model
inputobjectInput tensor

Vrne: tensor

Primer

lolo
1 (forward {"layers":[{"type":"dense","units":2}]} [0.5])

if

Conditional expression (ternary). Return type is union of branch types.

lolo
1 (if cond a b)

Parametri

ImeTipOpis
condbooleanCondition to evaluate
aanyValue if true
banyValue if false

Vrne: any

Primer

lolo
1 (if true 42 0) // => 42

let

Bind local variables for a body expression

lolo
1 (let bindings body)

Parametri

ImeTipOpis
bindingsarrayVariable binding pairs
bodyanyExpression using bindings

Vrne: any

Primer

lolo
1 (let [["x",10]] ["+","x",1]) // => 15

list

Literal array constructor — evaluates each argument and returns them as an array. Lowering wraps a literal list bound for a literal-array slot in list so it is unambiguously data, never a call (disambiguates a list whose first element collides with an operator name, e.g. [path method …]).

lolo
1 (list ...items)

Parametri

ImeTipOpis
...items{'kind': 'sexpr'}Items to collect into a literal array

Vrne: array

Primer

lolo
1 (list 1 2 3) // => [1 2 3]

log

Emit a structured info log line (compiled + runtime)

lolo
1 (log value)

Parametri

ImeTipOpis
valueanyValue to log

Vrne: void · Teče na: any

Primer

lolo
1 (log "User signed in")

navigate

Navigate to a route: (navigate path payload? options?) — options carries { crumb } labelling the navigation-stack entry for the target page

lolo
1 (navigate path)

Parametri

ImeTipOpis
pathstringRoute path

Vrne: void · Teče na: client

Primer

lolo
1 (navigate "/dashboard")

navigate-back

Pop the orbital-scoped navigation stack and return to the previous entry

lolo
1 (navigate-back)

Vrne: void · Teče na: client

Primer

lolo
1 (navigate-back)

not

Logical NOT

lolo
1 (not value)

Parametri

ImeTipOpis
valuebooleanBoolean value

Vrne: boolean

Primer

lolo
1 (not true) // => false

notify

Show a notification (in-app, email, push, sms)

lolo
1 (notify message)

Parametri

ImeTipOpis
messagestringNotification message (variadic)

Vrne: void · Teče na: any

Primer

lolo
1 (notify "Hello!")

or

Logical OR (returns the first truthy value, NOT a boolean — short-circuit)

lolo
1 (or a b)

Parametri

ImeTipOpis
abooleanFirst value
bbooleanSecond value (variadic)

Vrne: boolean

Primer

lolo
1 (or false true) // => true

path

Build a dot-separated path string from segments. Used with set effect for dynamic field paths.

lolo
1 (path segment)

Parametri

ImeTipOpis
segmentstringPath segment (variadic)

Vrne: string

Primer

lolo
1 (path "user" "id" "name") // => "user.id.name"

persist

Create, update, delete, clear, or batch entity records. Optional trailing { emit: { success, failure } } options object attaches closed-circuit emit routing.

lolo
1 (persist operation entity)

Parametri

ImeTipOpis
operationstringOperation type
entityentityEntity data (variadic)

Vrne: void · Teče na: server

Primer

lolo
1 (persist "create" "Task" {"title":"Buy milk"} {"emit":{"success":"TASK_CREATED"}})

ref

Reactive entity reference (deprecated, use fetch with listens in V2)

lolo
1 (ref entity)

Parametri

ImeTipOpis
entitystringEntity reference (variadic)

Vrne: void · Teče na: any

Primer

lolo
1 (ref "Task")

render-ui

Render a pattern into a UI slot

lolo
1 (render-ui pattern slot)

Parametri

ImeTipOpis
patternstringPattern name
slotstringSlot name (variadic)

Vrne: void · Teče na: client

Primer

lolo
1 (render-ui "button" "primary-slot")

send-server

Send an orbital event to the server over WebSocket (client-side; chat/real-time trigger)

lolo
1 (send-server event)

Parametri

ImeTipOpis
eventstringEvent name (variadic)

Vrne: void · Teče na: client

Primer

lolo
1 (send-server "CHAT_MESSAGE")

set

Set a binding to a value

lolo
1 (set binding value)

Parametri

ImeTipOpis
bindingstringVariable name
valueanyValue to set

Vrne: void · Teče na: any

Primer

lolo
1 (set "count" 42)

spawn

Spawn a new entity instance (games)

lolo
1 (spawn entity)

Parametri

ImeTipOpis
entityentityEntity to spawn (variadic)

Vrne: void · Teče na: any

Primer

lolo
1 (spawn "Bullet" {"x":10,"y":20})

swap

Atomic compare-and-swap of an entity field on the server

lolo
1 (swap target update)

Parametri

ImeTipOpis
target{'kind': 'binding'}The field to swap (@entity.counter)
update{'kind': 'sexpr'}The new value, computed from the current one

Vrne: void · Teče na: server

Primer

lolo
1 (swap @entity.counter (+ @entity.counter 1))

train

Train a model over a dataset (ML effect)

lolo
1 (train dataset)

Parametri

ImeTipOpis
datasetarrayTraining dataset

Vrne: object · Teče na: any

Primer

lolo
1 (train {"layers":[{"type":"dense","units":2}]} [[0,1],[1,0]] {"epochs":100})

watch

Emit an event whenever a watched binding changes

lolo
1 (watch target event options)

Parametri

ImeTipOpis
target{'kind': 'binding'}The binding to watch
event{'kind': 'eventKey'}Event emitted on each change
options{'kind': 'object', 'fields': {'debounce': 'number', 'emit': {'kind': 'object', 'fields': {}, 'open': True}}, 'open': False}debounce (ms) | emit

Vrne: void · Teče na: any

Primer

lolo
1 (watch @entity.status "STATUS_UPDATED" {"debounce":100})

when

Conditional effect without an else branch

lolo
1 (when condition effect)

Parametri

ImeTipOpis
conditionanyCondition to test
effectlambdaEffect to execute

Vrne: void

Primer

lolo
1 (when true (fn x (log "fired")))
© 2026 Almadar. Ljubljana, Slovenija.