"5 Things I Wish I Knew" - Macaulay2/Workshop-2015-Boise GitHub Wiki
-
From Dave Swinarski
- listForm command - we used it to get coefficients in Schur rings version 1.1
- select command
- partition(function, list) can be used to partition a list according to the values of a function
- Lists can be created with the syntax "for s in S list ( ... )" --- we don't always have to use the apply command
-
From Corey Harris
-
If you're editing a file test.m2 in Emacs, add something like the following to the end of the file to be able to F11 super easily!
endload "test.m2"-- lines you want to run -
To make a list of repeated terms do something like
toList (4:'e')which gives('e','e','e','e')
-
-
From Robert Williams
..can be used for more than making a simple sequence. It can also make a rectangluar block of sequences between two lists. e.g.{0,0}..{1,1}outputs({0,0}, {0,1}, {1,0}, {1,1})This is also useful for definining a large number of indexed variables with little code.