Factor, (削除) 73 (削除ここまで) 72(削除) 72 (削除ここまで) 83 bytes
: f ( x -- ) dup real? [ drop ] [ 1 cut 1 short cut* rot .append . [ f ] each ] if ;
Recursive function that (maybe) slices both ends off the input, prints them, then calls itself on all the remaining elements until an atom (real number) is reached. ((Now handles arrays with a single element properly at the cost of 11 bytes...))
Factor, (削除) 73 (削除ここまで) 72 bytes
: f ( x -- ) dup real? [ drop ] [ 1 cut 1 cut* rot . . [ f ] each ] if ;
Recursive function that slices both ends off the input, prints them, then calls itself on all the remaining elements until an atom (real number) is reached.
Factor, (削除) 73 (削除ここまで) (削除) 72 (削除ここまで) 83 bytes
: f ( x -- ) dup real? [ drop ] [ 1 cut 1 short cut* rot append . [ f ] each ] if ;
Recursive function that (maybe) slices both ends off the input, prints them, then calls itself on all the remaining elements until an atom (real number) is reached. ((Now handles arrays with a single element properly at the cost of 11 bytes...))
Factor, 73(削除) 73 (削除ここまで) 72 bytes
: f ( x -- ) dup real? [ drop ] [ 1 cut 1 cut* .rot swap. . [ f ] each ] if ;
Recursive function that slices both ends off the input, prints them, then calls itself on all the remaining elements until an atom (real number) is reached.
Factor, 73 bytes
: f ( x -- ) dup real? [ drop ] [ 1 cut 1 cut* . swap . [ f ] each ] if ;
Recursive function that slices both ends off the input, prints them, then calls itself on all the remaining elements until an atom (real number) is reached.
Factor, (削除) 73 (削除ここまで) 72 bytes
: f ( x -- ) dup real? [ drop ] [ 1 cut 1 cut* rot . . [ f ] each ] if ;
Recursive function that slices both ends off the input, prints them, then calls itself on all the remaining elements until an atom (real number) is reached.
Factor, 73 bytes
: f ( x -- ) dup real? [ drop ] [ 1 cut 1 cut* . swap . [ f ] each ] if ;
Recursive function that slices both ends off the input, prints them, then calls itself on all the remaining elements until an atom (real number) is reached.