Posts by south
J, 50 bytes {{({~[:y&(i.&1@:=)[:>+/&.>),{@(,&<)~p:i.p:^:_1 y}} Try it online! A nasty DD solution. {{({~[:y&(i.&1@:=)[:>+/&.>),{@(,&<)~p:i.p:...
Ruby 3.1.0, 274 259 249 bytes -10 bytes thanks to Paradox in the Ruby discord BEGIN{END{alias module class begin rescue retry ensure end if self elsif defined? for$.in true do super while f...
J, 3 bytes ,|. Try it online! This hook y f (g y) appends y with its reverse.
J, 17 bytes {{*./y|~*:2+i.y}} Try it online! A direct definition closest to Razetime's infuriatingly good train solution. Outputs a non-zero number for true and 0 for false.
J, 21 bytes ,&'+".1!:1(3)'1!:1(3) Try it online! STDIN is ugly in J because you have to use foreigns.
J, 4 3 distinct, 6 bytes -:_-:_ Half of _ -: _ which is asks if infinity matches infinity. Thanks to @xash in the APL farm discord for saving the 3 unique bytes and orthoplex for catching my bl...
J, 2 bytes p. Try it online! J likes inflections so it won't beat APL, but J is still a contender :).
J, 10 7 bytes +/>:?#/ Try it online! +/>:?#/ #/ : Inserts dyadic # into an array n m Creates n copies of m ? : Roll from 0..y >: : Increment +/ : S...
J, 7 9 bytes ++2&=@+.~ Try it online! Dyadic fork that executes with the form (x + y) + (2 = x +. y). Thanks to torres for pointing out the obvious flaw.
J, 5 bytes -/ .* Try it online! For the determinant conjunction, the space before u is necessary, so there is no shaving a byte here. If you want to read more about this conjunction, check out...
J, 15 bytes 'Hello, World!' Or if you prefer to beat around the bush...76 bytes. {:a.{~-:^:_1@:|.~&2 S:0<@:<\50 16.5 36 50.5 54 54 55.5 22 16 43.5 55.5 57 54 Try it online!
J, 1 byte # Try it online! The copy verb. It works the exact same as APL and Jelly's replicate.
J, 4 bytes -:|. Try it online! Checks if the input array matches itself reversed. This is a tacit form and is executed monadically as x f (g x).
J, 2 bytes */ Try it online! For complex numbers with 0 as the second part, J will represent them as ints, but they are treated the same.
- ← Previous
- 1
- 2
- Next →