Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

sort_partial.fz


sort_partial container.sorted_array i32
  post
    result[0] = -5,
    result[1] = 0,
    result[9999] = 9999
  is
    arr := array i32 10000 ((i) ->
      if i % 5 = 0
        i - 5
      else
        i)
    res := arr.sort((a,b) -> a <= b)
    res
last changed: 2023-11-14