RosettaCodeData/Task/Create-a-two-dimensional-ar.../BQN/create-a-two-dimensional-ar...

15 lines
456 B
BQN
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bqn
# Cut 𝕩 at occurrences of 𝕨, removing separators and empty segments
# (BQNcrate phrase).
Split (¬-˜×·+`»>)
# Natural number from base-10 digits (BQNcrate phrase).
Base10 10×+˜´
# Parse any number of space-separated numbers from string 𝕩.
ParseNums {Base10¨ -'0' ' ' Split 𝕩}
# •GetLine is a nonstandard CBQN extension.
•Show (×´) ParseNums •GetLine@