Edit

kc3-lang/kc3/test/ikc3/list.kc3

Branch :

  • test/ikc3/list.kc3
  • []
    [[] | []]
    [[], []]
    [[], [], []]
    [[], [], [], []]
    [[], [] | []]
    [[], [], [] | []]
    [[] | [[], []]]
    [[] | [[], [], []]]
    [[] | [[] | []]]
    [[] | [[], [] | []]]
    [[] | [[], [], [] | []]]
    [[[], []] | [[], []]]
    [[[] | []] | [[] | []]]
    [:a | []]
    [:a, :b]
    [:a, :b, :c]
    [:a | :b]
    [:a, :b | :c]
    [:a, :b, :c, :d]
    [:a, :b, :c | :d]
    
    # comment 0
    # comment 0b
    [ # comment 1
      # comment 1b
      :a # comment 2
         # comment 2b
      ,  # comment 3
         # comment 3b
      :b ## comment 4
         ## comment 4b
      ,  ## comment 5
         ## comment 5b
      :c ## comment 6
         ## comment 6b
      |  ## comment 7
         ## comment 7b
      :d ## comment 8
         ## comment 8b
      ]  ## comment 9
         ## comment 9b
    quote List.map([1, 2, 3, 4], fn (x) { x * 2 })
    List.map([1, 2, 3, 4], fn (x) { x * 2 })
    quote List.reverse([1, 2, 3, 4])
    List.reverse([1, 2, 3, 4])
    quote List.has?([:read], :read)
    List.has?([:read], :read)
    quote List.has?([:read], :write)
    List.has?([:read], :write)
    quote List.join(["1", "2", "3"], ", ")
    List.join(["1", "2", "3"], ", ")
    quote List.each([1, 2, 3], fn (x) { puts(x) })
    List.each([1, 2, 3], fn (x) { puts(x) })
    quote List.last([1, 2, 3])
    List.last([1, 2, 3])
    quote List.slice([1, 2, 3, 4, 5], 2, 4)
    List.slice([1, 2, 3, 4, 5], 2, 4)
    quote List.length([])
    List.length([])
    quote List.length([1])
    List.length([1])
    quote List.length([1, 2])
    List.length([1, 2])
    quote List.length([1, 2, 3, 4, 5])
    List.length([1, 2, 3, 4, 5])
    quote type(":")
    type(":")
    quote [":"]
    [":"]