1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-06 23:06:49 +02:00

[standard-ml/en-en] Update to list part

This commit is contained in:
David Pedersen
2013-12-05 11:45:43 +01:00
parent 34838b8dad
commit e76f7cd452

View File

@@ -95,7 +95,8 @@ val groups = [ [ "Alice", "Bob" ],
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_groups = ["Batman","Superman"] :: groups