Releases: callmesalmon/kite
Releases · callmesalmon/kite
386Kite
This is a new release. Has been brewing for two weeks now, but not much work. Has been kind of... DEAD. But
now, we are back with a brand new release.
New features
- Brand new module; func. Named after
functional programming as it uses that.
Includes the following functions:- loop(func, times, until) - Loops a function (loop->params->index(2) has to be 0)(if you aren't stupid).
- Syntax changes.
Examples
let loop = fun(func, times, until)
if times < until do @(func, times + 1, until)
else func
let incr = fun(num)
num + 1
let mainloop = fun(k, j, i)
loop(incr(k), j, i)
loop(mainloop(1, 5, 25), 0, 10) write(tostring(100)
import io
io.print(100)
writeln(tostring(100))
import io
io.println(100) let println = fun(v)
writeln(tostring(v)
let sum = fun(x)
if x < 2 do x
else x + sum(x - 1)
println(sum(3)) let println = fun(v)
writeln(tostring(v))
println((fun(x) if x < 2 do x else x + @(x - 1))(3)) import io
io.print(10)
io.println(20)
io.print(30) let export print = fun(val)
write(tostring(val))
let export println = fun(val)
writeln(tostring(val)) import func
let test = fun()
writeln(tostring(100))
func.loop(test(), 0, 10)1.0.0
let output = 0
let i = 1
while i < 10 do
let j = 0
while j < 10 do
output = output + j * i
if j == 5 then break
j = j + 1
end
i = i + 1
end # To print without newline:
write(tostring(100))
# or
import io
io.print(100)
# To print with a newline:
writeln(tostring(100))
# or
import io
io.println(100) let println = fun(v)
writeln(tostring(v))
let sum = fun(x)
if x < 2 then x
else x + sum(x - 1)
println(sum(3)) let println = fun(v)
writeln(tostring(v))
println((fun(x) if x < 2 then x else x + @(x - 1))(3)) import io
io.print(10)
io.println(20)
io.print(30) let export print = fun(val) write(tostring(val))
let export println = fun(val) writeln(tostring(val))0.1
First release available to the public, but this has been brewing for a while.
Examples
let output = 0
let i = 1
while i < 10 do
let j = 0
while j < 10 do
output = output + j * i
if j == 5 then break
j = j + 1
end
i = i + 1
endlet write = fun(v)
__write(tostring(v))
let sum = fun(x)
if x < 2 then x
else x + sum(x - 1)
write(tostring(sum(3)))let write = fun(v)
__write(tostring(v))
write(tostring((fun(x) if x < 2 then x else x + @(x - 1))(3)))import io
io.write(1)stdlib/io.kite
let export write = fun(val) __write(tostring(val))