Skip to main content
Commonmark migration
Source Link
Misplaced some of the explanation orders after the last edit..
Source Link
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384
€D   # For each character in the (implicit) input-list,
     # keeping all values on the stack into the resulting list:
 D   # Duplicate it
     # OR
 Â   # Bifurcate it (short for duplicate & reverse copy)
     # (which will be output implicitly as result)

In the legacynew version of 05AB1E, it keeps all values on the horizontal mirror builtin would be instead of ºstack into the resulting list when doing a map. However, ∞S doesn't work inWhereas with the legacy version, because of 05AB1E it would implicitly convert the list to a newline-delimited string before mirroring it completely (Try it here), after whichonly keep the S would also includetop value. Which is why these newlinesonly work in the new version.

In the new version of 05AB1E, it keeps all values on the stack into the resulting list. Whereas withThis builtin wasn't there yet in the legacy version of 05AB1E it would only keep the top value. Which is why these only work in the new version.

This builtin wasn't there yet inIn the legacy version of 05AB1E, the horizontal mirror builtin would be instead of º. However, ∞S doesn't work in the legacy version, because it would implicitly convert the list to a newline-delimited string before mirroring it completely (Try it here), after which the S would also include these newlines.

€D   # For each character in the (implicit) input-list,
     # keeping all values on the stack into the resulting list:
 D   # Duplicate it
     # OR
 Â   # Bifurcate it (short for duplicate & reverse copy)
     # (which will be output implicitly as result)

In the legacy version of 05AB1E, the horizontal mirror builtin would be instead of º. However, ∞S doesn't work in the legacy version, because it would implicitly convert the list to a newline-delimited string before mirroring it completely (Try it here), after which the S would also include these newlines.

In the new version of 05AB1E, it keeps all values on the stack into the resulting list. Whereas with the legacy version of 05AB1E it would only keep the top value. Which is why these only work in the new version.

This builtin wasn't there yet in the legacy version of 05AB1E.

   # For each character in the (implicit) input-list,
     # keeping all values on the stack into the resulting list:
 D   # Duplicate it
     # OR
 Â   # Bifurcate it (short for duplicate & reverse copy)
     # (which will be output implicitly as result)

In the new version of 05AB1E, it keeps all values on the stack into the resulting list when doing a map. Whereas with the legacy version of 05AB1E it would only keep the top value. Which is why these only work in the new version.

This builtin wasn't there yet in the legacy version of 05AB1E.

In the legacy version of 05AB1E, the horizontal mirror builtin would be instead of º. However, ∞S doesn't work in the legacy version, because it would implicitly convert the list to a newline-delimited string before mirroring it completely (Try it here), after which the S would also include these newlines.

Added some more 2-byters after Grimy's comment
Source Link
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384
€Dø˜ or øS  (both 05AB1E versions)
ζ˜ or ζS  (new 05AB1E version only)
€Â€D or €Â  (new 05AB1E version only)
.ι        (new 05AB1E version only)
ºS        (new 05AB1E version only)
·S or xS  (legacy 05AB1E version only)
+S        (legacy 05AB1E version only)
ø˜    (both 05AB1E versions)

Try ø˜ online or Try øS online.
Try ζ˜ online or Try ζS online.
Try €D online.
  or Try €Â online..
Try online.
Try ºS online.
Try ·S online. or Try xS online.
Try +S online.
Try øS online.

€D  ø # Duplicate each character# ofZip/transpose the (implicit) input-list with itself
     #  i.e. ["a","b","c"] → [["a","a"],["b","b"],["c","c"]]
 ˜   # Deep flatten it
     # keepingOR
 allS values on the# stackConvert intoit theto resultinga flattened list of characters
     # (which will be output implicitly as result)
 
€Â

The only program which works the same in both versions of 05AB1E. :)

ζ    # BifurcateZip/transpose (shortthe for(implicit) duplicateinput-list &with reversethe copy(implicit) eachinput-list
 character of the
  #  i.e. #["a","b","c"] (implicit) input-list[["a","a"],["b","b"],["c","c"]]
 keeping˜ all values on# theDeep stackflatten intoit
 the resulting   # OR
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)

In the newThis version of 05AB1E, it keeps all values onbasically works the stack intosame as the resulting listone above for the new version. Whereas withIn the legacyold version of 05AB1E ityou would only keep the top valueneed an explicit pair first, and then you could zip/transpose that. Which is why these only workJust ζ on a 1D list will be a no-op in the newlegacy version of 05AB1E.

º €D   # MirrorFor each valuecharacter in the (implicit) input-list,
     # keeping i.e.all ["a","b","c"]values on ["aa","bb","cc"]the stack into the resulting list:
 SD   # ConvertDuplicate it 
 to a flattened list of# charactersOR
 Â   # Bifurcate it (short for duplicate & reverse copy)
     # (which will be output implicitly as result)
.ι   # Interleave the (implicit) input-list with the (implicit) input-list
     # (which will be output implicitly as result)

In the new version of 05AB1E, it keeps all values on the stack into the resulting list. Whereas with the legacy version of 05AB1E it would only keep the top value. Which is why these only work in the new version.

º    # Mirror each value in the (implicit) input-list
     #  i.e. ["a","b","c"] → ["aa","bb","cc"]
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)
·    # Double each character
     # OR
x    # Double each character (without popping)
     #  i.e. ["a","b","c"] → ["aa","bb","cc"]
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)

Again, because the legacy version of 05AB1E was built in Python, "a"+"a" results in "aa", whereas the + cannot be used to append strings in the new version. (PS: There is an append for strings which works in both version, which is «, but when giving two list arguments it will concatenate them together instead of merging each string at the same indices like the program above (Try it here).)

ø    # Zip the (implicit) input-list with itself
     #  i.e. ["a","b","c"] → [["a","a"],["b","b"],["c","c"]]
 ˜   # Deep flatten it
     # (which will be output implicitly as result)

The only program which works the same in both versions of 05AB1E. :)

€D    (new 05AB1E version only)
€Â    (new 05AB1E version only)
.ι    (new 05AB1E version only)
ºS    (new 05AB1E version only)
·S    (legacy 05AB1E version only)
+S    (legacy 05AB1E version only)
ø˜    (both 05AB1E versions)

Try €D online.
  Try €Â online.
Try online.
Try ºS online.
Try ·S online.
Try +S online.
Try øS online.

€D   # Duplicate each character of the (implicit) input-list,
     # keeping all values on the stack into the resulting list
     # (which will be output implicitly as result)
 
€Â   # Bifurcate (short for duplicate & reverse copy) each character of the
     # (implicit) input-list, keeping all values on the stack into the resulting list
     # (which will be output implicitly as result)

In the new version of 05AB1E, it keeps all values on the stack into the resulting list. Whereas with the legacy version of 05AB1E it would only keep the top value. Which is why these only work in the new version.

º    # Mirror each value in the (implicit) input-list
     #  i.e. ["a","b","c"]  ["aa","bb","cc"]
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)
.ι   # Interleave the (implicit) input-list with the (implicit) input-list
     # (which will be output implicitly as result)
·    # Double each character
     #  i.e. ["a","b","c"] → ["aa","bb","cc"]
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)

Again, because the legacy version of 05AB1E was built in Python, "a"+"a" results in "aa", whereas the + cannot be used to append strings in the new version. (PS: There is an append for strings which works in both version, which is «, but when giving two list arguments it will concatenate them together instead of merging each string at the same indices like the program above (Try it here).)

ø    # Zip the (implicit) input-list with itself
     #  i.e. ["a","b","c"] → [["a","a"],["b","b"],["c","c"]]
 ˜   # Deep flatten it
     # (which will be output implicitly as result)

The only program which works the same in both versions of 05AB1E. :)

ø˜ or øS  (both 05AB1E versions)
ζ˜ or ζS  (new 05AB1E version only)
€D or €Â  (new 05AB1E version only)
.ι        (new 05AB1E version only)
ºS        (new 05AB1E version only)
·S or xS  (legacy 05AB1E version only)
+S        (legacy 05AB1E version only) 

Try ø˜ online or Try øS online.
Try ζ˜ online or Try ζS online.
Try €D online or Try €Â online.
Try online.
Try ºS online.
Try ·S online or Try xS online.
Try +S online.

ø    # Zip/transpose the (implicit) input-list with itself
     #  i.e. ["a","b","c"] → [["a","a"],["b","b"],["c","c"]]
 ˜   # Deep flatten it
     # OR
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)

The only program which works the same in both versions of 05AB1E. :)

ζ    # Zip/transpose the (implicit) input-list with the (implicit) input-list
     #  i.e. ["a","b","c"]  [["a","a"],["b","b"],["c","c"]]
 ˜   # Deep flatten it
     # OR
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)

This version basically works the same as the one above for the new version. In the old version you would need an explicit pair first, and then you could zip/transpose that. Just ζ on a 1D list will be a no-op in the legacy version of 05AB1E.

€D   # For each character in the (implicit) input-list,
     # keeping all values on the stack into the resulting list:
 D   # Duplicate it 
     # OR
 Â   # Bifurcate it (short for duplicate & reverse copy)
     # (which will be output implicitly as result)
.ι   # Interleave the (implicit) input-list with the (implicit) input-list
     # (which will be output implicitly as result)

In the new version of 05AB1E, it keeps all values on the stack into the resulting list. Whereas with the legacy version of 05AB1E it would only keep the top value. Which is why these only work in the new version.

º    # Mirror each value in the (implicit) input-list
     #  i.e. ["a","b","c"] → ["aa","bb","cc"]
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)
·    # Double each character
     # OR
x    # Double each character (without popping)
     #  i.e. ["a","b","c"] → ["aa","bb","cc"]
 S   # Convert it to a flattened list of characters
     # (which will be output implicitly as result)

Again, because the legacy version of 05AB1E was built in Python, "a"+"a" results in "aa", whereas the + cannot be used to append strings in the new version. (PS: There is an append for strings which works in both version, which is «, but when giving two list arguments it will concatenate them together instead of merging each string at the same indices like the program above (Try it here).)

added 2375 characters in body
Source Link
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384
Loading
added 459 characters in body
Source Link
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384
Loading
added 459 characters in body
Source Link
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384
Loading
Source Link
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384
Loading