lambda - scheme chicken implementation, subenvironment script loading -


background

i using scheme chicken implementation. latest version (4.9.0.1).

i trying implement generic arithmetic system on rational, complex , fix-precision numbers in file called arithmetic.scm.

but complex numbers, designed generic arithmetic system both rectangular , polar representations, decide write code complex number in file called complex.scm.

problem

so when try load complex.scm file arithmetic.scm, found functions have same name in both files, want use lambda wrap former sub environment , register operators there using property list. however, load command can load script global environment no matter writen. wonder, other renaming functions or copy code complex.scm lambda function, other options have. lot!

you should indeed use module system such situations, chris jester-young indicated.

however, have seen numbers egg? adds full numeric tower support (including rational numbers, arbitrarily large integers , complex numbers). extension can installed separately, (tentatively) slated inclusion next major version (chicken 5).

full disclosure: i'm current maintainer of numbers egg.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -