##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: October 2016 # Modified: 2016-10-09/20:18-0400 ##+ # # min.icn, demonstrate the minimum value function # link fullimag procedure main() write(min(1,2,3)) write() # using the apply operator comes in handy for min L := [1,2,3,4,5] write(min!L) # equivalent to write(min(1,2,3,4,5)) write() # min also accepts structures directly write(min(L)) # although min accepts structures, results are somewhat "fuzzy" L1 := ["abc", "def"] L2 := ["uvw", "xyz", "123"] L3 := ["UVW", "XYZ"] L4 := ["ZZZ", "457", "002"] L5 := ["YYY", "456", "001"] write(fullimage(min(L1, L2, L3, L4, L5))) end