RosettaCodeData/Task/Order-two-numerical-lists/Nu/order-two-numerical-lists.nu
2024-10-16 18:07:41 -07:00

9 lines
185 B
Text

def 'list lt' [b] {
let a = $in
$a | zip $b
| skip while { $in.0 == $in.1 }
| try { first } catch { [$a $b] | each { length } }
| $in.0 < $in.1
}
[5 6 7 8] | list lt [5 6 8]