Skip to content

Commit

Permalink
docs: improve some .length() examples
Browse files Browse the repository at this point in the history
  • Loading branch information
usaoc committed Feb 18, 2024
1 parent 0388d7f commit d81a298
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion rhombus/scribblings/ref-list.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ it supplies its elements in order.
@examples(
List.length([1, 4, 8])
List.length([])
[1, 4, 8].length
[1, 4, 8].length()
[].length()
)

}
Expand Down
1 change: 1 addition & 0 deletions rhombus/scribblings/ref-map.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ in an unspecified order.
Map.length({"a": 1, "b": 2})
Map.length({})
{"a": 1, "b": 2}.length()
{}.length()
)

}
Expand Down
3 changes: 2 additions & 1 deletion rhombus/scribblings/ref-pair.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ list is a pair, a pair is a pair list only if its ``rest'' is a list.
@examples(
PairList.length(PairList[1, 4, 8])
PairList.length(PairList[])
PairList[1, 4, 8].length
PairList[1, 4, 8].length()
PairList[].length()
)

}
Expand Down
3 changes: 2 additions & 1 deletion rhombus/scribblings/ref-set.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,9 @@ it supplies its elements in an unspecified order.

@examples(
Set.length({"a", "b"})
Set.length(Set())
Set.length(Set{})
{"a", "b"}.length()
Set{}.length()
)

}
Expand Down

0 comments on commit d81a298

Please sign in to comment.