Answer by Rolf Mertig for How to define a package without adding it to...
Just using DeleteCases seems to work too: BeginPackage["ChurchNumerals`"]; ZERO::usage = "ZERO is the Church encoding of zero"; ONE::usage = "ONE is the Church numeral encoding of the integer 1";...
View ArticleAnswer by Leonid Shifrin for How to define a package without adding it to...
There is a simpler way:BeginPackage["ChurchNumerals`"];ZERO::usage = "ZERO is the Church encoding of zero";ONE::usage = "ONE is the Church numeral encoding of the integer 1";TWO::usage = "TWO is the...
View ArticleAnswer by Joel Klein for How to define a package without adding it to...
One way to do this is by taking note of how EndPackage works -- by adding \$Context to \$ContextPath:ChurchNumerals`Private`prevContext = Context[];BeginPackage["ChurchNumerals`"]; ZERO::usage = "ZERO...
View ArticleHow to define a package without adding it to $ContextPath
How can you introduce a package, so that it is listed in $Packages, without adding it to $ContextPath?Note that this question is concerned with defining a package when evaluating code, e.g. through...
View Article