Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

66%
+2 −0
Challenges 1, 2, Fizz, 4, Buzz!

Vyxal Hj, 10 bytes ƛ₍₃₅kF½*∑∴ Try it Online! Vyxal has gotten a whole lot better since first posting this. Explained Very simply, this is: for each item in the range [1, 100], create the lis...

posted 4y ago by lyxal‭  ·  edited 3y ago by lyxal‭

Answer
#3: Post edited by user avatar lyxal‭ · 2021-06-27T23:19:40Z (over 3 years ago)
  • # [Vyxal](https://github.com/Lyxal/Vyxal), `jM`, 18 bytes
  • ```
  • Ĥƛ3œıƆĿ*n5œıŧĤ*+n⟇
  • ```
  • ## Explained
  • Ĥƛ3œıƆĿ*n5œıŧĤ*+n⟇
  • Ĥ # Push the number 100
  • ƛ # Start a lambda map doing the following over the range [1, 100]: (it would usually map over [0,99] but the M flag makes the lambda increase the start and end of that range)
  • 3œ # Find the divisibility of the argument by 3 AND
  • ıƆĿ # Push the compressed string "Fizz" AND
  • * # Multiply the two together THEN
  • n5œ # Find the divisibility of the argument by 5 AND
  • ıŧĤ # Push the compressed string "Buzz" AND
  • * # Multiply the two together THEN
  • + # Add the two multiplied strings together THEN
  • n⟇ # Short-circuit OR the string and the argument.
  • # The `j` flag automatically joins with newlines
  • # [Vyxal](https://github.com/Lyxal/Vyxal) `Hj`, 10 bytes
  • ```
  • ƛ₍₃₅kF½*∑∴
  • ```
  • [Try it Online!](https://lyxal.pythonanywhere.com?flags=Hj&code=%C6%9B%E2%82%8D%E2%82%83%E2%82%85kF%C2%BD*%E2%88%91%E2%88%B4&inputs=&header=&footer=)
  • Vyxal has gotten a whole lot better since first posting this.
  • ## Explained
  • Very simply, this is: for each item in the range `[1, 100]`, create the list `[item % 3 == 0, item % 5 == 0]`, multiply that by `["Fizz", "Buzz"]`, sum that and get the maximum of the number and the summed list.
#2: Post edited by user avatar lyxal‭ · 2020-11-19T09:08:15Z (about 4 years ago)
  • # [Vyxal](https://github.com/Lyxal/Vyxal), `jM`, 18 bytes
  • ```
  • Ĥƛ3œıƆĿ*n5œıŧĤ*+n⟇
  • ```
  • ## Explained
  • Ĥƛ3œıƆĿ*n5œıŧĤ*+n⟇
  • Ĥ # Push the number 100
  • ƛ # Start a lambda map doing the following over the range [1, 100]: (it would usually map over [0,99] but the M flag makes the lambda increase the start and end of that range)
  • 3œ # Find the divisibility of the argument by 3 AND
  • ıƆĿ # Push the compressed string "Fizz" AND
  • * # Multiply the two together THEN
  • n5œ # Find the divisibility of the argument by 5 AND
  • ıŧĤ # Push the compressed string "Buzz" AND
  • * # Multiply the two together THEN
  • + # Add the two multiplied strings together THEN
  • n⟇ # Short-circuit OR the string and the argument.
  • # The `j` flag automatically joins with newlines
  • String compression here is dictionary string compression.
  • A clarification: When you try to map a function to an integer, the range [0, integer) is generated and is consequently used as the iterable. The M flag makes this implicit range [1, integer]
  • # [Vyxal](https://github.com/Lyxal/Vyxal), `jM`, 18 bytes
  • ```
  • Ĥƛ3œıƆĿ*n5œıŧĤ*+n⟇
  • ```
  • ## Explained
  • Ĥƛ3œıƆĿ*n5œıŧĤ*+n⟇
  • Ĥ # Push the number 100
  • ƛ # Start a lambda map doing the following over the range [1, 100]: (it would usually map over [0,99] but the M flag makes the lambda increase the start and end of that range)
  • 3œ # Find the divisibility of the argument by 3 AND
  • ıƆĿ # Push the compressed string "Fizz" AND
  • * # Multiply the two together THEN
  • n5œ # Find the divisibility of the argument by 5 AND
  • ıŧĤ # Push the compressed string "Buzz" AND
  • * # Multiply the two together THEN
  • + # Add the two multiplied strings together THEN
  • n⟇ # Short-circuit OR the string and the argument.
  • # The `j` flag automatically joins with newlines
#1: Initial revision by user avatar lyxal‭ · 2020-11-19T08:52:04Z (about 4 years ago)
# [Vyxal](https://github.com/Lyxal/Vyxal), `jM`, 18 bytes

```
Ĥƛ3œıƆĿ*n5œıŧĤ*+n⟇
```

## Explained

    Ĥƛ3œıƆĿ*n5œıŧĤ*+n⟇

    Ĥ                      # Push the number 100
     ƛ                     # Start a lambda map doing the following over the range [1, 100]: (it would usually map over [0,99] but the M flag makes the lambda increase the start and end of that range)
      3œ                   #   Find the divisibility of the argument by 3 AND
        ıƆĿ                #   Push the compressed string "Fizz" AND
           *               #    Multiply the two together THEN
            n5œ            #   Find the divisibility of the argument by 5 AND
               ıŧĤ         #   Push the compressed string "Buzz" AND
                  *        #   Multiply the two together THEN
                   +       #   Add the two multiplied strings together THEN
                    n⟇     #   Short-circuit OR the string and the argument.
                           # The `j` flag automatically joins with newlines
     

String compression here is dictionary string compression.

A clarification: When you try to map a function to an integer, the range [0, integer) is generated and is consequently used as the iterable. The M flag makes this implicit range [1, integer]