Commit 1deeead8 authored by Kevin Cozens's avatar Kevin Cozens Committed by Kevin Cozens

Added 'butlast' and 'last'.

2006-06-09  Kevin Cozens  <kcozens@cvs.gnome.org>

	* scripts/script-fu-compat.init: Added 'butlast' and 'last'.
parent c2b91171
2006-06-09 Kevin Cozens <kcozens@cvs.gnome.org>
* scripts/script-fu-compat.init: Added 'butlast' and 'last'.
2006-10-05 Kevin Cozens <kcozens@cvs.gnome.org>
* tiny-fu/tiny-fu-console.c
......
......@@ -148,6 +148,10 @@
(* 4 (atan 1.0))
)
(define (butlast x)
(reverse (cdr (reverse x)))
)
(define (cons-array count type)
(case type
((long) (make-array count "int32"))
......@@ -199,6 +203,10 @@
)
)
(define (last x)
(cons (car (reverse x)) '())
)
(define (nth k list)
(list-ref list k)
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment