[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stupid module and pregexp questions
From: |
Andreas Rottmann |
Subject: |
Re: Stupid module and pregexp questions |
Date: |
Fri, 25 Apr 2003 00:55:51 +0200 |
User-agent: |
Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.2 (gnu/linux) |
Marius Vollmer <address@hidden> writes:
> Andreas Rottmann <address@hidden> writes:
>
>> ~% ls *.scm
>> simple-math.scm
>> ~% guile
>> guile> %load-path
>> ("/home/andy/share/guile/site" "/usr/local/share/guile/site"
>> "/usr/local/share/guile/1.7" "/usr/local/share/guile" ".")
>> guile> (gcd 21 6)
>> 3
>
> Heh, there is a builtin 'gcd', of course. You don't load the module
> as it seems.
>
Only forgot to paste that, and :export. Should have chosen another
function (name), it seems ;-) For completeness:
,----
| (define-module (simple-math)
| :export (some-stupid-func))
|
| (define (some-stupid-func a) (* a a a a))
`----
Then load with `(use-modules (simple-math))'
Regards, Andy
--
Andreas Rottmann | address@hidden | address@hidden | address@hidden
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62
Python is executable pseudocode, Perl is executable line-noise.
Re: Stupid module and pregexp questions, Rob Browning, 2003/04/28
Re: Stupid module and pregexp questions, tomas, 2003/04/28