#Automatic vectorization
Automatic vectorization
Note that some operators in 05AB1E vectorize automatically on arrays. For example, the code 5L3+, which disassembles to the following pseudocode:
[1, 2, 3, 4, 5] + 3
would become:
[4, 5, 6, 7, 8]
If it doesn't vectorize automatically, you can also use the € operator. It takes a single character command, and performs that (monadic) operator on each element. An example to split each element is the following code (try it here):
€S
Whereas the normal S operator would split each element in the array and flattens it into a single array (try it here).
#Automatic vectorization
Note that some operators in 05AB1E vectorize automatically on arrays. For example, the code 5L3+, which disassembles to the following pseudocode:
[1, 2, 3, 4, 5] + 3
would become:
[4, 5, 6, 7, 8]
If it doesn't vectorize automatically, you can also use the € operator. It takes a single character command, and performs that (monadic) operator on each element. An example to split each element is the following code (try it here):
€S
Whereas the normal S operator would split each element in the array and flattens it into a single array (try it here).
Automatic vectorization
Note that some operators in 05AB1E vectorize automatically on arrays. For example, the code 5L3+, which disassembles to the following pseudocode:
[1, 2, 3, 4, 5] + 3
would become:
[4, 5, 6, 7, 8]
If it doesn't vectorize automatically, you can also use the € operator. It takes a single character command, and performs that (monadic) operator on each element. An example to split each element is the following code (try it here):
€S
Whereas the normal S operator would split each element in the array and flattens it into a single array (try it here).
#Automatic vectorization
Note that some operators in 05AB1E vectorize automatically on arrays. For example, the code 5L3+, which disassembles to the following pseudocode:
[1, 2, 3, 4, 5] + 3
would become:
[4, 5, 6, 7, 8]
If it doesn't vectorize automatically, you can also use the € operator. It takes a single character command, and performs that (monadic) operator on each element. An example to split each element is the following code (try it here):
€S
Whereas the normal S operator would split each element in the array and flattens it into a single array (try it here).