File: toList-doc.m2

package info (click to toggle)
macaulay2 1.17.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 68,376 kB
  • sloc: cpp: 102,995; ansic: 10,040; javascript: 6,019; sh: 3,506; makefile: 3,426; lisp: 727; yacc: 590; perl: 369; xml: 177; python: 141; lex: 65; awk: 3
file content (39 lines) | stat: -rw-r--r-- 802 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- Status: rewritten July 2018
-- Author: Lily Silverstein

doc///
 Key
  toList
  (toList, BasicList)
  (toList, Set)  
 Headline
  create a list
 Usage
  toList A
 Inputs
  A:
   a @TO Set@, or a @TO BasicList@ such as a @TO Sequence@
 Outputs
  L:List
   a list whose elements are the elements of {\tt A}
 Description
  Example
   A = set(3,7,9,6)
   toList A
  Text
   The command {\tt toList 1..9} will throw an error, because {\tt toList}
   comes before @TO".."@ in Macaulay2's order of operations. To create a list
   from a range, use {\tt toList (1..9)} instead.
  Example
   toList (1..9)
  Text
   Converting between list types may change the order of the elements in
   unexpected ways.
  Example
   toList set {4,5,13}
 SeeAlso
  BasicList
  List
  toSequence
  "lists and sequences"
///