smoλ
A safe & fast low-level language.
smoλ

Tutorial

for beginners
smoλ

Onboarding

from other languages
smoλ

Std

the standard library
smoλ

Materials

whitepapers and blog posts
@include std.builtins
@include std.mem

smo Segment(nominal, str value)
    -> @args // return all inputs

smo Segment(String _value)
    value = _value:str 
    -> nominal:Segment(value)

smo combine(Segment[] segments)
    &s = "":str  // mutable
    on Stack:arena(1024)
        range(segments:len)
        :while next(u64 &i)
            // from null-termiated nstr result to str
            s = str(s+segments[i].value+" ")
    -- -- -> combined // end block x2, return

service main()
    segments = Segment[] 
    :push("I think.":Segment)
    :push("Therefore I am.":Segment)
    print(segments:combine)
    --