Skip to main content
edited body
Source Link
Ruan
  • 341
  • 1
  • 4

ErrLess, 6 bytes

0m:rMr.M

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

Try it online!

ErrLess, 6 bytes

0m:rM.

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

Try it online!

ErrLess, 6 bytes

0m:r.M

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

Try it online!

Added TIO link
Source Link
Ruan
  • 341
  • 1
  • 4

ErrLess, 6 bytes

0m:rM.

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

I haven't written an JS interpreter yet, so there's no TIO-like service for ErrLess yet. It's currently very WIP.Try it online!

ErrLess, 6 bytes

0m:rM.

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

I haven't written an JS interpreter yet, so there's no TIO-like service for ErrLess yet. It's currently very WIP.

ErrLess, 6 bytes

0m:rM.

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

Try it online!

deleted 234 characters in body
Source Link
Ruan
  • 341
  • 1
  • 4

ErrLess, 6 bytes

0m:rM.

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

ErrLess is a stack-based language I made for fun over the last few months. You can read the docs here, and I also started a tutorial.

I haven't written an JS interpreter yet, so there's no TIO-like service for ErrLess yet. It's currently very WIP.

ErrLess, 6 bytes

0m:rM.

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

ErrLess is a stack-based language I made for fun over the last few months. You can read the docs here, and I also started a tutorial.

I haven't written an JS interpreter yet, so there's no TIO-like service for ErrLess yet. It's currently very WIP.

ErrLess, 6 bytes

0m:rM.

A macro.

Explanation

0 { Push a 0 to the stack to identify the macro } 
m { Start macro definition }
: { (L a b) -> (L (a b)) }
r { Rotate }
. { Halt (Return) }
M { End macro definition }

You can test it with the following program:

0m
 :r.
M

{ Test cases: }

1,2x3x4x5x6x7x8x9xax 3 7
0" # a? { Outputs "(1 2 3 8 5 6 7 4 9 10)" and a newline }

3,8x1x4xaxaxaxax 0 5
0" # a? { Outputs "(10 8 1 4 10 3 10 10)" and a newline }

5,1x4x2x3x 0 4
0" # a? { Outputs "(3 1 4 2 5)" and a newline }

5,6x 0 1
0" # a? { Outputs "(6 5)" and a newline }

2,2x2x 0 1
0" # a? { Outputs "(2 2 2)" and a newline }
.

I haven't written an JS interpreter yet, so there's no TIO-like service for ErrLess yet. It's currently very WIP.

Source Link
Ruan
  • 341
  • 1
  • 4
Loading