Quantcast
Channel: How to define a package without adding it to $ContextPath - Mathematica Stack Exchange
Browsing latest articles
Browse All 4 View Live

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 Article



Answer 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 Article

Answer 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 Article

How 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
Browsing latest articles
Browse All 4 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>