WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

scheme and texmacs

View: New views
2 Messages — Rating Filter:   Alert me  

scheme and texmacs

by Sam Liddicott :: Rate this Message:

| View Threaded | Show Only this Message

When I enter a scheme command (Meta-X):

(define squarez (lambda (x)  (* x x)))

I can then enter Meta-X: (squarez 3)

and the status bar says: 9

But if I enter this in the document:

<extern|(lambda (x) (squarez x))|3>

I get:

<wrong-type-arg|*|Wrong type argument in position ~A: ~S|?|?>

If I put a literal number instead of the x then a bold ? is shown
<extern|(lambda (x) (squarez 3))|3>

What am I missing here?

_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@...
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Re: scheme and texmacs

by Joris van der Hoeven :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, May 23, 2012 at 09:23:35AM +0100, Sam Liddicott wrote:

> When I enter a scheme command (Meta-X):
>
> (define squarez (lambda (x)  (* x x)))
>
> I can then enter Meta-X: (squarez 3)
>
> and the status bar says: 9
>
> But if I enter this in the document:
>
> <extern|(lambda (x) (squarez x))|3>
>
> I get:
>
> <wrong-type-arg|*|Wrong type argument in position ~A: ~S|?|?>

The x is a TeXmacs tree, not a number.
Also, the function was not defined to be secure.

_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@...
https://lists.gnu.org/mailman/listinfo/texmacs-dev