Add mul and echo utilities

This commit is contained in:
joachimschmidt557 2019-03-07 14:50:39 +01:00
parent dcfdb290f7
commit 3b5369fb21
5 changed files with 15 additions and 1 deletions

BIN
echo Executable file

Binary file not shown.

8
echo.nim Normal file
View file

@ -0,0 +1,8 @@
import cligen, sequtils
proc main(strings:seq[string], newline=true) =
if newline: writeLine(stdout, strings.foldl(a & b))
else: write(stdout, strings.foldl(a & b))
flushFile(stdout)
dispatch(main)

BIN
mul Executable file

Binary file not shown.

6
mul.nim Normal file
View file

@ -0,0 +1,6 @@
import cligen, sequtils
proc main(integers:seq[int]) =
echo integers.foldl(a * b)
dispatch(main)

View file

@ -6,4 +6,4 @@ license = "Unlicense"
requires "nim >= 0.19.0"
requires "cligen >= 0.9.19"
bin = @["add", "false", "seq", "sleep", "true"]
bin = @["add", "echo", "false", "mul", "seq", "sleep", "true"]