Posts by Shaggy
JavaScript, 25 bytes The function is called with f(g)(n), where g is a function. g=>h=n=>n-1?g(h(n-1),n):1 Try it online!
Japt, 13 bytes Takes input as a character array. mnG ìUrÔÄ ªUl Try it mnG\nìUrÔÄ ªUl :Implicit input of character array U m :Map n : Convert from bas...
Japt, 15 bytes É©Òß[U*3ÄUz]gUv Try it É©Òß[U*3ÄUz]gUv :Implicit input of integer U É :Subtract 1 © :Logical AND with Ò :Negate the ...
Rockstar, 90 bytes listen to S split S listen to N O's"" while S roll S into C let C be*N-0 let O be+C say O Try it here - code will need to be pasted in; s goes on the first line of ...
JavaScript, 36 bytes s=>n=>s.replace(/./g,`$&`.repeat(n)) Try it online!
Japt -m, 2 bytes pV Try it pV :Implicit map of first input string p :Repeat V :Second input times
Japt, 10 bytes `HÁM, {U}! Try it The backtick decompresses a compressed string, the {} is Japt's string interpolation and U is the first input variable.
JavaScript, 76 bytes Outputs an array of lines. s=>[...s+=[...s].reverse().join``].map((c,x)=>s[-~x]?c.padEnd(x)+(x?c:``):s) Try it online!
JavaScript, 37 bytes I/O as character arrays. a=>b=>b.flatMap(x=>a.map(y=>x<y?x:y)) Try it online!
Japt -m, 5 bytes Takes input in reverse order. Sadly, Japt has no minimum built-in for strings. VcmUc Try it VcmUc :Implicit map of each U in the first input string V :Second inp...
Japt, 17 bytes Needs some more work. É?[U]cßÂUp½+Uu:1ì Try it If there's a proof that the length of the sequence for any given n never exceeds n**3 then ... Japt, 14 bytes NcU³Æ=Âp½+UuÃâ ...
JavaScript, 37 32 bytes Outputs a comma delimited string. f=n=>n-1?n+[,f(n**(.5+n%2)|0)]:n Try it online!
JavaScript, 20 bytes Outputs false for truthy and true for falsey. a=>a.some(x=>x-a[0]) Try it online! Outputs true and false as normal. a=>new Set(a).size<2 Try it online!
Japt -R, 12 bytes õÈ"/\\"mpXÃû Try it õÈ"/\\"mpXÃû :Implicit input of integer õ :Range [1,input] È :Map each X "/\\" : Literal string m ...
Japt, 4 bytes Takes the operator as a string but would also work without modification using a function by assigning it to variable V. That can be done in the header by leaving a blank line and the...
Cracks Mark Girrafe's answer: Japt No way I wasn't getting this one! Even if the intended solution was Pyth. "Cops and Robbers Test it
Japt, 19 bytes Takes the artwork as an array of lines and the string as the second input. If we can require that the artwork be right padded with spaces on each line so they're all the same length...
Japt, cracked by Razetime, 44 bytes ((Cops)&(Robbers))`¬ps d bÞ`¸ËhDÎmEgviuø Test it `...`¸ËhDÎmEgviuø `...` :Compressed string "cops and robbers" ¸ ...
JavaScript, 44 bytes a=>g=n=>a.every(([p,q])=>(x=n*p/q)%1)?n:g(x) Try it online!
Japt v2.0a0, 18 bytes The r÷ can be removed if we can take an array of floats instead. T=V£*Xr÷Ãæv1)?ßT:U Try it T=V£*Xr÷Ãæv1)?ßT:U :Implicit input of integer U and 2D-array V T= ...
Japt -R, 16 bytes This feels far too long for the task at hand - what am I missing?! ;Bó v ¬£14îUiX q Test it ;Bó\nv ¬£14îUiX q ;B :Uppercase alphabet ó ...
Japt -R, 27 bytes Lõ@"FiBu"ò úz4 ËpXv°EÑÄìªX Test it Lõ@"FiBu"ò úz4 ËpXv°EÑÄìªX L :100 õ :Range [1,L] @ ...
Japt -h, 13 12 9 bytes à m+V kbU Try it à m+V kbU :Implicit input of strings U & V à :Combinations of U m :Map +V : Append V k :Filt...
Japt, 11 bytes Could be 2 bytes shorter if not for a bug in Japt when trying to get the proper divisors of a number. õ üÈgXnXâ x Try it õ üÈgXnXâ x :Implicit input of integer U õ ...
JavaScript (Node.js), 33 bytes a=>n=>a.reduce((o,x,y)=>o+x*n**y) Try it online!