/ fundamentals / collect_command.nu
collect_command.nu
1  # Collect command collects a stream of values into a single value 
2  
3  let list1 = [1 2 3 4]
4  
5  let collect1 = ($list1 | collect {|x| $x.1})
6  
7  print $collect1