Given an input, wrap in parens then go in one character on each side and repeat for brackets. Repeat until you reach the string's core (len <= 2).
Hello World!
becomes `(H[e(l[l(o[ W]o)r]l)d]!)
Prints a script's file's byte count.
Print random integers between 0 and 99 (inclusive). Stop after printing any 0.
Given a switch case in a nested tuple format ((condition_code_as_str, result), (condition_code_as_str_two, result_two), ...)
, return the result for the first true condition.
Phone number pads associate certain letters with certain numbers. Either encode (e.g. "Hi!" > "44!") or decode (e.g. "44!" > "Hi!"|"IG!") along these lines. This is accomplished in a dumb way for brevity. See tetraketra/dial-up for a slightly less dumb version.
Perform massive n-body position updating.
Recreate the game 2048.
Treat a single line of user input as simply reverse polish ntoation and print the resultant calculated value.
Define a function which accepts a list of strings and returns with the highest "ascii total". "ascii total" is calculated by converting each character in a string to its ascii integer value, then summing the resultant numbers.
Evaluate an arbitrary list of tuples of boolean conditions (as code strings) and values (as any), returning the associated value for the first true condition.