POV-Ray : Newsgroups : povray.off-topic : GIMP hotkeys/ scripts/ user-defined functions? : Re: GIMP hotkeys/ scripts/ user-defined functions? Server Time
6 Sep 2024 15:16:46 EDT (-0400)
  Re: GIMP hotkeys/ scripts/ user-defined functions?  
From: nemesis
Date: 10 Dec 2008 10:23:39
Message: <493fdefb$1@news.povray.org>
Invisible escreveu:
>>> Yes, Scheme is a Lisp dialect.  No, I quite don't understand why it'd 
>>> be such a PITA. :)
>>
>> Something about dozens of parenthesis...
> 
> (if (= 1 x) (lambda (n) (1)) (lambda (n) (+ 1 n)))

I don't really think someone scripting Gimp needs lambdas.  And your 
first lambda will fail because 1 is not a function, but you've put it in 
calling context as the first element of a list.

Other than that, "if" is as straightforward as in any language.

(if condition
   this
   that)

or just
(if condition this)

Actually, the "if-then-else" statement was born in Lisp.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.