mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-09 16:26:53 +02:00
[standard-ml/en-en] Update to list part
This commit is contained in:
@@ -95,7 +95,8 @@ val groups = [ [ "Alice", "Bob" ],
|
|||||||
|
|
||||||
val number_count = List.length numbers (* gives 7 *)
|
val number_count = List.length numbers (* gives 7 *)
|
||||||
|
|
||||||
(* You can put single values in front of lists of the same kind *)
|
(* You can put single values in front of lists of the same kind
|
||||||
|
using the :: ("cons") operator *)
|
||||||
val more_numbers = 13 :: numbers (* gives [13, 1, 3, 3, 7, ...] *)
|
val more_numbers = 13 :: numbers (* gives [13, 1, 3, 3, 7, ...] *)
|
||||||
val more_groups = ["Batman","Superman"] :: groups
|
val more_groups = ["Batman","Superman"] :: groups
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user