• This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not create additional questions.

  • This is no longer a , nor are snippet lengths limited by the vote tally. If you know this thread from before, please make sure you familiarize yourself with the changes.

This thread is dedicated to showing off interesting, useful, obscure, and/or unique features your favorite programming languages have to offer. This is neither a challenge nor a competition, but a collaboration effort to showcase as many programming languages as possible as well as possible.

How this works

  • All answers should include the name of the programming language at the top of the post, prefixed by a #.

  • Answers may contain one (and only one) factoid, i.e., a couple of sentences without code that describe the language.

  • Aside from the factoid, answers should consist of snippets of code, which can (but don't have to be) programs or functions.

  • The snippets do not need to be related. In fact, snippets that are too related may be redundant.

  • Since this is not a contest, all programming languages are welcome, whenever they were created.

  • Answers that contain more than a handful of code snippets should use a Stack Snippet to collapse everything except the factoid and one of the snippets.

  • Whenever possible, there should be only one answer per programming language. This is a community wiki, so feel free to add snippets to any answer, even if you haven't created it yourself. There is a Stack Snippet for compressing posts, which should mitigate the effect of the 30,000 character limit.

Answers that predate these guidelines should be edited. Please help updating them as needed.

Current answers, sorted alphabetically by language name

$.ajax({type:"GET",url:"https://api.stackexchange.com/2.2/questions/44680/answers?site=codegolf&filter=withbody",success:function(data){for(var i=0;i<data.items.length;i++){var temp=document.createElement('p');temp.innerHTML = data.items[i].body.split("\n")[0];$('#list').append('<li><a href="/a/' + data.items[i].answer_id + '">' + temp.innerText || temp.textContent + '</a>');}}})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><base href="http://codegolf.stackexchange.com"><ul id="list"></ul>


226 Answers 226



(whoops I forgot the link before :p)

(pair of) Factoid(s):

Dotsplit is a mostly syntax free language, with odd builtins (kind of like mathematica), but is currently in it's infancy. Dotsplit is named after the tokeniser used in the interpreter: str.split(). This is a weak tokeniser, but it fulfills all needs of the language, so far anyway.

1 byte:


D does


nothing. it isn't a tiny builtin, unless you count a nop as a builtin, and it's only a nop because it isn't a defined command. Dotsplit has relatively long command names for most things. Note that the shortest happens to be three long. anything that isn't a defined command is ignored. also note commands are case insensitive, so if it were a command, d would be the same as D

2 bytes:

still not much interesting


b with a leading space. This program functions identically to b, as well as D, because nops, but if b was a command, b and D would not be the same, but b and [space]b would. Spaces are used to separate commands, but otherwise are ignored. Next upvote, and we get an actual command!

3 bytes

First command!


This will pop a and b, and push a+b. Popping from an empty stack yields 0. hence, this program will leave one 0 on the stack. add is case insensitive, and will function regardless of case (AdD will also work)

4 bytes

There are a fair amount more commands with 4 bytes, not many still. I chose this one


This program will wait for input by the user. If input is "derp" (case-sensitive), it prints "Derp". Otherwise, "Nope"

  • \$\begingroup\$ That derp though... \$\endgroup\$ – Qwerp-Derp Oct 30 '16 at 8:10



D2 is a Brainfuck-like turing tarpit with a 2D memory model

Length 1


This prints 0. Why?

. is, like in Brainfuck, the print command. But since cells are limited to 36 values, D2 use a shift-state system to print most ASCII characters. In shift state 0, the alphabet is 0123456789abcdefghijklmnopqrstuvwxyz, and since the cell is initialized to 0, this print 0.

Length 2


Now this print !.

The ; instruction increment the shift state. In shift state 1, the alphabet is !@#$%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ, so this print ! because the current cell is 0.

Length 3



>   Turn the cursor 90° to the right
 }  Advance in the tape
  + Increment the pointed cell

So the memory after this is:


This demonstrate D2's 2D tape

Length 4


This set the first cell of the tape to 1, put the value in the register, advance one cell and put the value of the register in the cell.



Factoid: This language originally started out as a joke, based on the "Mathematica has builtins for everything"; this can be seen by the residual Rot command, made for Rot13 and similar challenges.

Length 0 snippet

The empty program is valid in Attache. Try it online!

Length 1 snippet


Try it online! The V function was one of the first implemented. It represents a Vector of values, and used to be the only way to create array literals.

Length 2 snippet


Try it online!

This is a quoted operator; it acts just as a function which performs addition. It can be assigned like so:

f := `+
Print[ f[1, 2] ]
?? prints 3

Length 3 snippet


Try it online! This is a demonstration fo the range operator in Attache. Attache's main focus resides in generation and selection, as is common with functional languages.

Length 4 snippet


Try it online! Bond is a function used to partially call functions. In this case, Bond[f, n] returns a function which takes arguments ...x and calls f[...x, n]. In the link, this is shown by example:

f := Bond[`/, 1]

This function returns a function which returns the reciprocal of the input. This is roughly equivalent to the lambda:

{ _ / 1 }

…but we'll get to that next.

Length 5 snippet


Try it online! This is a lambda function, which can be called with any amount of arguments. These arguments are accessible using blanks, with _N referring to the Nth argument, starting at _1. _ is short from _1. So, this function can be written as:

{ _2 - _1 }

This is the 1st argument subtracted from the 2nd. In the example, we assign this function to f. Then, f[3, 6] is 6 - 3, which evaluates to 3.

Length 7 snippet


Try it online! This shows the operator form of !, which takes a function on the left and an argument on the right. It's equivalent to function calling. This calls the inbuilt Print function with input 7, which outputs 7.

Length 8 snippet


Try it online! This demonstrates a few more operators in Attache. First, ~, when used functionally, reverses the operands given to a function. So, for example, (~V)[1, 2, 3] would be called as V[3, 2, 1], which gives [3, 2, 1]. ~ has the effect of reversing the order in which abstracts are called. The above function could be rewritten as:


Now, the ' operator, when used on data, concatenates them. Since - is unary, it negates _2. This is equivalent to:

{ [ -_2, _1 ] }

Assign it as f, and f[1, 2] becomes [-2, 1].

Length 9 snippet


Try it online!

& when using data, a&b, creates an array of a copies of b. So, _&_ creates _ copies of _. 4&4 is, for example, [4, 4, 4, 4]. Then, Sum is called on that array. Thus, this squares a number.



I'll use upvote * 2 because this language uses pairs

Length 6 snippet


This is a infinite loop. Transpiles to -[].

Length 4 snippet


Reads a letter and prints it. Transpiles to ,..
This does the same thing: uM hM.

Length 2 snippet


Now we're getting into things. This snippet transpiles into Branfuck +, which increments the current memory cell by one.

Length 1 snippet


Anything that isn't an letter is ignored. This snippet is basically a comment.


Alphafuck is an esolang I made that transpiles to Brainfuck.




The only valid characters in NO! are NOno!?. This language was created 2 hours ago and I'm currently writing this with my 12th cup of coffee in my hand. This language is close to the antithesis of code golf as demonstrated by this answer to the Hello, World! challenge.


Hello, World!

NOOOOOOOOO?Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Noooooooooooooooooooooooooooooooooooooooooooo Noooooooooooooooooooooooooooooooo Nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Nooooooooooooooooooooooooooooooooo

Add two numbers


Prime Tester


Bitwise Cyclic Tag


Bitwise Cyclic Tag is a programming language with only two commands, 0 and 1. It operates on an unbounded tape of bits and is somehow Turing-complete...? I don't yet understand this, but I'll be learning the language along with all of you. Bitwise Cyclic Tag is incredibly simple, even compared to brainfuck and other Turing tarpits, making it a very useful tool for proving other languages' Turing-completeness—if it can interpret BCT, it can do anything! In fact, our very own Ørjan Johansen did just this to prove /// Turing-complete in 2009, writing this interpreter.

Length 1 snippet


This here is half of the language. When a zero bit is encountered in the code, the first bit of the data tape is discarded (some implementations print it as well). That's it.

This program demonstrates an important feature of BCT: the code is not run just once, but over and over until the data tape is empty (hence, "cyclic"), at which point execution halts. Therefore, this 0.125-byte program can be considered a sort of cat program, as in any implementation that prints on discard, this will print the entire starting data tape in order and exit gracefully.

Length 1 snippet


This here is the other command in BCT. It's a touch more complicated. When a one bit is encountered in the code, if the first data bit is a one, the following bit in the code is appended to the data (on the end). If the first data bit is a zero, nothing happens. In either case, the bit in the code immediately following the 1 is skipped.

It is worth noting that I was not completely honest about repeated execution in the first snippet. The code is treated as a loop (think Haskell's repeat), so if this snippet is executed, the bit possibly written is the 1 itself. This snippet, then, will infinitely add ones to the end of the data if the tape starts with a 1 or do nothing forever otherwise.



Logy is a logic, imperative and functional programming language.

0 bytes

A program without the main rule do nothing.

1 byte


Start a line comment

2 bytes


The rule definition operator




SQF (Status Quo Function) is the scripting language for the Real Virtuality engines (O:FP, ArmA, ArmA 2, ArmA 3). The games written for the engine are functionally just mods made in SQF.

Length 0 Snippet:

This is technically valid SQF, and does nothing unless it is treated as code, in which case it is a no-op.

Length 1 Snippet:


+ does the usual things in SQF:

  • Concatenation of arrays
  • Concatenation of strings
  • Addition of numbers

And something really cool as well:

  • Deep-copying of arrays (as a unary prefix)

Length 2 Snippet:


_x is a magic variable which is used in these cases:

  • The current element in the optional predicate block argument of count (an array function)
  • The current element in the main block of a forEach block

Length 3 Snippet:


This subtracts b from a, if the operation is applicable to the types of a and b.
Like quite a few things in SQF, it does something particularly neat with arrays:

  • When a and b are arrays, the result of a-b is the set exclusion of b from a



Triangularity is a minimalistic esolang, which can (for now) only perform very basic arithmetic and string / list manipulation. As its name might suggest, every piece of code should be padded nicely with triangles of dots. Valid Triagularity programs must have the character count listed in OEIS A056220 (except for -1), otherwise you are probably doing something wrong.

Length 1


This just pushes a 0 onto the stack, and the top of the stack is implicitly outputted.

Length 7


First off, ) pushes a 0 onto the stack, the argument to I, which retrieves the 0th line from STDIN. E evaluates it to an integer and finally p tests our integer for primality.

Length 17


Adds any two valid inputs, either numbers or collections.

Length 31


Computes the absolute value of a number, by multiplying by its sign, with a few tweaks.

Length 49


Checks if the integer part of the square root of two numbers given as input is identical.

Length 71

..... .....
.." Wor"+..

Of course, we need a "Hello, World!" program! This can actually be golfed down to 49 bytes

.... ....
." Wor"+.

Try it online!



Pain-flak is brain-flak's evil sibling, I would just read the docs here

6 Bytes:


That pushes 1 to the stack (stack clean)

156 Bytes:


The hello world program made by Dennis (run with -A)


Author's note: While more snippets have been prepared, I will honor the original restriction somewhat and wait for interest.


Zsh may seem like a new language, given the (relatively) recent popularity of the "Oh My Zsh" framework, but it in fact dates back to 1990, just one year after Bash released. Zsh's syntax is inspired by the bourne shell and ksh.

Many people are familiar with Bash scripting, but don't understand how Zsh differs. Zsh brings a surprising amount of powerful constructs. I'll be highlighting these differences here.

Length 1 Snippet


This is equivalent to the command true. It returns zero (truthy in shell scripts). Uses for this include short bodyless for loops: for ((x;y;z)):

Length 2 Snippet


Parameter expansion. If a is set to some value, substitute that value.

Unlike in Bash and POSIX shells, if $a is an array, this will expand to all non-empty elements (or, in the language of shells, "words") of $a.

Length 3 Snippet


This is equivalent to the expansion ${=s}, which induces word splitting. For parameter expansion forms that involve a prefix (except for flags, see below) or modifiers (see below) the surrounding braces can be removed if unambiguous.

Unlike in Bash and POSIX shells, word splitting is not done on parameters by default. To split on $IFS, this construct is needed, or the option shwordsplit needs to be set.

Length 4 Snippet


When expanding globs, Zsh supports glob qualifiers specified in parentheses after the glob. Appending (.) as above will cause this glob to expand to all regular files in the directory. There are dozens of globbing qualifiers, here are just a few:

  • /: Directories
  • F: Non-empty directories
  • @: Symlinks
  • U: Files owned by the effective UID
  • Yn: When n is a number, expand to the first n matches.

Length 5 Snippet


This will expand x as a glob. This is useful to match filenames, match case expressions, and in [[ tests.

Length 6 Snippet


Zsh supports various modifiers to parameter expansion. The l modifier will lowercase all words of s. The equivalent construct in bash is "${s,,}" (or if s is an array: "${s[@],,}".

Other useful modifiers include:

  • a: Turns paths into absolute paths
  • A: Turns paths into absolute paths with symlinks resolved
  • s/foo/bar: Does replacement on each element. Use gs/foo/bar for global replacement.
  • &: Repeat the previous substitution.

Length 7 Snippet


Zsh also supports roughly 30 parameter expansion flags. The i flag will sort the parameters case-insensitively.

  • k: Substitute the array keys instead of values
  • P: Induce indirect parameter expansion: if a='b' and b='c', then ${(P)a} expands to 'c'
  • q: Quote characters special to the shell with backslashes or $'\NNN'. q- and q+ will use different methods for quoting.
  • u: Remove duplicate words in the expansion.
  • z: Split into words according to shell parsing grammar: if c='"a b" c', then ${(z)c} will split into "a b" c.

Length 8 Snippet


With this expression, if a is some array (e.g.: a=(hello world)), a is converted to a brace expansion (e.g.: xyhelloz xyworldz

Length 9 Snippet


Like in bash, this is a here-string. Unlike in bash, if no command is provided, the string is printed to stdout. This can often be used as a replacement for echo, except that the expansion of ${str} occurs in a subshell.

Length 10 Snippet


Array subscripts also have flags! r is "reverse subscripting": This will give the first word in a whose value matches a?*. (Likewise, R gives the last match.)

Other flags include i and I which return the indices or keys of the match, k and K which match the keys, or w or f which split scalar a on words or lines, respectively.

Length 11 Snippet


This is another form of parameter expansion, it will expand to all words of "$@" that exist in the array a. Similarly, ${@:|a} will expand to the words of $@ which do not exist in a.

Length 12 Snippet


One of the most powerful features of Zsh is that parameter expansions can be indefinitely nested. So this will take s, split it on newlines, and then strip each line's the last path component. (/usr/bin/zsh/usr/bin)




Pushy was never meant to be a language. It was originally just a postfix expression calculator, implemented with a stack. However, I (FlipTack) expanded it, adding several built-ins, loops, and (sort of) strings, it evolved into a language.


Note: in the showcase update, all answers are CW, so feel free to contribute to this post! Also, snippet length is no longer restricted by vote count.

Click on the header of any snippet to run it in the online interpreter!

Length 7 Snippet:


This program is the beginning in a chain of programs which output larger versions of themselves.

This program pushes 95, copies (&) it, then pushes 34. _ prints the stack's values, and " prints it again but as a string, resulting in:

95 95 34

Which in turn outputs:

95 95 34
95 95 34

5 or so iterations later, it looks like this:

95 95 34 95 95 34 95 95 34 95 95 34
95 95 34 95 95 34 95 95 34 95 95 34
95 95 34 95 95 34 95 95 34 95 95 34
95 95 34 95 95 34 95 95 34 95 95 34

...and it keeps growing forever. (If you iterate ~8 times, TIO begins to cut the output)

Length 3 Snippet:


This is in fact an adaption of my asterisk triangle answer. Given an integer, for example n = 5, it prints a "d-triangle" of this size:


This is a concise example of both loops and char-code conversion in Pushy:

:    \ Input times do (consuming input):
 H   \   Push 100 to the stack (character code for 'd')
  "  \   Print the whole stack, as a string.

As each iteration pushes a new 'd', this creates a triangle.

Notice there is no "end-loop" delimiter: this is normally signified with a ;. However, the interpreter automatically assumes these to be at the end of the program if omitted.

  • \$\begingroup\$ What's with the downvote? \$\endgroup\$ – FlipTack Nov 8 '17 at 18:23



tinylisp is a language made by @DLosc for an "interpret this language" challenge. Its intent is to demonstrate what a Lisp-like language can do using only very few builtins.

Here is an interpreter.

Snippet 1:


This single character is perhaps the most used builtin in tinylisp: the def builtin. It can be used to define variables and functions, and is basically required for every tinylisp program. Like any other lisp-like language, you define things like this:

(d x 10) // Creates a new variable x, and sets it to 10
(d succ  // Successor function, will be properly covered later
  (q (
    (s 1 (s 0 x)))))

Snippet 2:


Everything in tinylisp (and basically most Lisp-like languages) are built off of parentheses. In tinylisp, these parentheses define an empty list - which is one of three data types in tinylisp:

  • Symbols
  • Numbers (which will be covered in the next snippet)
  • Lists

Snippet 3:


tinylisp has numbers, but surprisingly enough, this is not a number. Numbers (at least, numbers you can type down before compilation) in tinylisp only have the characters 0-9 in them, and anything else is a name, so these "numbers" aren't numbers in tinylisp:

-13    (contains -)
.335   (contains .)
17,232 (contains ,)

There's currently no way to define floats in tinylisp, however I'm working on implementing a fraction "class" thing in tinylisp. - Qwerp-Derp

Snippet 4:


This is a four-character builtin in tinylisp, however most builtins are only one character (see snippet 1 for an example). This basically returns a value to STDOUT, with a trailing newline.

Snippet 5:

(v 1)

Yes, finally, a full statement that actually evaluates to something!

This evaluates the number 1, and therefore returns 1. That's simple enough - more complicated examples are to come.

Try it online! (from snippet 5 onwards, you should be able to test all of the programs).

Snippet 6:


This snippet quotes the list (1), and therefore evaluates to (1). I'm doing the best I can with 6 bytes...

q basically takes anything, and then returns the same thing, unevaluated. So for a program like this:

(q (s 1 2))

Instead of returning 3, it returns (s 1 2) instead.

Try it online!

Snippet 7:

(s 1 2)

s is the subtraction builtin; more specifically, it subtracts two integers. The above returns -1. Incidentally, s is the only way to get negative numbers in tinylisp (compare snippet 3).

Try it online!

Snippet 8:


This is the simplest example of a lambda in tinylisp, and is essential to both evaluating other things and creating functions. The structure of lambdas is like so:

(q (  ;; Lambdas have to be quoted using "q", so not to get evaluated
  ()  ;; A list of arguments, in this example there are 0 args, so
      ;; this is an empty list
  1   ;; The "body" of the lambda: in this case, we're returning 1
      ;; for every input.

This statement is essentially similar to the Python lambda lambda:1 (which is also 8 bytes long, coincidentally). It can be used like so:

( (q(()1)) )  ;; evaluates to 1

Try it online!

  • \$\begingroup\$ You don't actually say how to define floats. What if I want to enter 1.5? \$\endgroup\$ – Pavel Jan 26 '17 at 4:01
  • \$\begingroup\$ @Pavel There's no way to define floats in tinylisp, unfortunately... :p \$\endgroup\$ – Qwerp-Derp Jan 26 '17 at 4:02

CGL (CGL Golfing Language)

(or Code Golf Language, this was not intentional :)


CGL uses the stack concept like a lot of other golfing languages, but unlike them it has an infinite number of stacks that it has. Most operators operate on the current stack except some that change the current stack or move things. Stacks have numerical indexes. 0 is the default stack. The -1th stack is where input is stored.

I am unsure how bytes are counted for some of this unicode, so feel free to correct me in comments.

1 byte


Outputs Hello, World!. Actually pushes Hello, World! to the current stack (default 0) and the first element in the current stack is outputted by default.

2 bytes

There are a lot of possible 2 byte programs, but I wanted to show a cool operator in this one: -. - decrements the current stack, in this case switching from 0 (default) to -1 (where input is stored). ² squares the current stack. The first item in the current stack is outputted by default, so this squares the input and returns it.

3 bytes (uses a combining character)


This shows off the neat string compressing function. Normally, you wrap a string in "s and it is pushed to the current stack. 's enable you to use compressed strings. ҄낄䀀 is the compressed version of Hi! (note in this example, there is no compression savings, but with longer strings there often is. Also, you can use & to compress the current stack.) Quotes are auto-completed if you leave them off.

4 bytes


Adds 2 to the input. adds the second stack item to the first or 1 to the first if the second stack item is non-existent.

5 bytes


The # pushes the following number to the stack. Note that technically numbers are wrapped in #s, but if you leave them off they will be added between the last digit and any non-number character. The (diffrent from +) adds the first 2 stack items and pushes that to the stack. outputs the last item from the stack and exits. This therefore adds 1 to the input.



Decimal, also called 09D by some users, is an esoteric stack-based programming language I created that uses only the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and D.


  • Decimal is stringly typed. The PUSH code for STRING is 3.
  • Decimal was on tio.run from day 1 of its release.
  • Decimal is not based on the top of the stack. It's based on a Default Stack Index (DSI). All functions that write to the stack set this index.
  • While very obfuscated, Decimal can be easily translated into pseudo-stack code.
  • All characters other than 0-9 and D are simply printed as they appear in the source code. This excludes whitespace.
  • Decimal uses Assembly-like comment syntax, e.g. ;COMMENT.

The Decimal GitHub repo is here.

Length 1 snippet

2 is the command for POP. Simple enough. POP pops the DSI from the stack.


Length 1 snippet

5 is the command for IF/ENDIF.


If not in an if-statement, 5 will check the DSI value. If truthy, the interpreter will continue reading as normal. If falsy, it will ignore all commands until 5, except JUMP. JUMP will exit any if-statement.

If currently in an if-statement, 5 acts as ENDIF.

Length 3 snippet

Command 3 is the command for I/O. The first argument specifies where to read from (0 for stack, 1 for user input). The second argument specifies where to put the read value (0 for stack, 1 for output).

All I/O commands are 3 characters long.

Length 3 snippet

Command 9 is the command for JUMP. JUMP commands must end in the character D. JUMP 0 exits the program.


If jump #1 has not been declared, 91D will declare it. If jump #1 has been declared, 91D will jump to it.

Length 4 snippet

Command 4 is the command for MATH. See the MATH section in the Decimal README for more information on MATH arguments. Each MATH command must end in D.


This compares STACK[DSI-1] and STACK[DSI] for equality, pops both, and pushes the result.



MY currently has no implemented codepage, so code will be listed in both bytes and the unimplemented codepage, one following the other. MY is stack based and "vector oriented" (like Jelly, some commands automatically "vecify" over their arguments). MY also has an "Object Subject Verb" visual order of commands.

1 byte


This program outputs 0 with a trailing newline. MY does not have implicit input nor implicit output, if one pops from an empty stack, it pops 0.

2 bytes

1F 27

This program takes a line of raw input, then outputs it (with a trailing newline). MY can't do very much in 1 or 2 bytes due to lack of implicit IO.

3 bytes

1F 64 27

Reads a line from STDIN, then converts it from hexadecimal (must be uppercase) to an integer. This beats Jelly.

4 bytes

01 02 81 26

This is where the quirk of MY comes in, for multiple argument commands, MY pops the amount of arguments needed, then applies them to a function in the order that they are popped. OSV, this resembles (hence, the Y standing for Yoda). Thus, the above code outputs 1 rather than -1 (without a trailing newline).

5 bytes

01 4D 02 80 26

This showcases MY's "vector orientation". This differs from APL and J, but is more like Jelly's concept of vectorizing ("vecifying" in MY). The program pushes 1 to the stack, wraps that in an array, pushes 2 to the stack, adds the top two elements, then displays with no newline (outputting [3] due to the "vecification" of commands).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.