4 |
;; This file is for the remaining few, that can't be. |
;; This file is for the remaining few, that can't be. |
5 |
;; Thus, CODE IN THIS FILE SHOULD BE CONSTRUCTED VERY CAREFULLY. |
;; Thus, CODE IN THIS FILE SHOULD BE CONSTRUCTED VERY CAREFULLY. |
6 |
1 |
1 |
7 |
;; Time-stamp: <2004-12-31 22:40:24 deego> |
;; Time-stamp: <2005-01-08 12:52:24 deego> |
8 |
;; Copyright (C) 2004 D. Goel |
;; Copyright (C) 2004 D. Goel |
9 |
;; Emacs Lisp Archive entry |
;; Emacs Lisp Archive entry |
10 |
;; Filename: erbcspecial.el |
;; Filename: erbcspecial.el |
56 |
|
|
57 |
;;; Code: |
;;; Code: |
58 |
|
|
59 |
(defun erbnoc-special-quote-function (fcn) |
(defun erbn-special-quote-function (fcn) |
60 |
(cond |
(cond |
61 |
((symbolp fcn) |
((symbolp fcn) |
62 |
(erblisp-sandbox-quoted fcn)) |
(erblisp-sandbox-quoted fcn)) |
64 |
(equal (first fcn) 'lambda) |
(equal (first fcn) 'lambda) |
65 |
fcn)) |
fcn)) |
66 |
;; notice the recursion below: |
;; notice the recursion below: |
67 |
((listp fcn) (erbnoc-special-quote-function (fs-eval fcn))) |
((listp fcn) (erbn-special-quote-function (fs-eval fcn))) |
68 |
(t (error "Cannot apply this as a function!")))) |
(t (error "Cannot apply this as a function!")))) |
69 |
|
|
70 |
|
|
78 |
|
|
79 |
(defun fsi-mapcar (fcn ls) |
(defun fsi-mapcar (fcn ls) |
80 |
(apply 'mapcar |
(apply 'mapcar |
81 |
(erbnoc-special-quote-function fcn) |
(erbn-special-quote-function fcn) |
82 |
ls nil)) |
ls nil)) |
83 |
|
|
84 |
|
|
97 |
|
|
98 |
(defun fsi-mapc (fcn ls) |
(defun fsi-mapc (fcn ls) |
99 |
(apply 'mapc |
(apply 'mapc |
100 |
(erbnoc-special-quote-function fcn) |
(erbn-special-quote-function fcn) |
101 |
ls nil)) |
ls nil)) |
102 |
|
|
103 |
|
|
104 |
|
|
105 |
(defun fsi-mapconcat (fcn ls sep) |
(defun fsi-mapconcat (fcn ls sep) |
106 |
(apply 'mapconcat |
(apply 'mapconcat |
107 |
(erbnoc-special-quote-function fcn) |
(erbn-special-quote-function fcn) |
108 |
ls sep nil)) |
ls sep nil)) |
109 |
|
|
110 |
|
|
116 |
(defun fsi-maplist (fcn ls &rest args) |
(defun fsi-maplist (fcn ls &rest args) |
117 |
(require 'cl) |
(require 'cl) |
118 |
(apply 'maplist |
(apply 'maplist |
119 |
(erbnoc-special-quote-function fcn) |
(erbn-special-quote-function fcn) |
120 |
ls args)) |
ls args)) |
121 |
|
|
122 |
|
|
124 |
(defun fsi-mapl (fcn ls &rest args) |
(defun fsi-mapl (fcn ls &rest args) |
125 |
(require 'cl) |
(require 'cl) |
126 |
(apply 'mapl |
(apply 'mapl |
127 |
(erbnoc-special-quote-function fcn) |
(erbn-special-quote-function fcn) |
128 |
ls args)) |
ls args)) |
129 |
|
|
130 |
(defun fsi-mapcar* (fcn ls &rest args) |
(defun fsi-mapcar* (fcn ls &rest args) |
131 |
(require 'cl) |
(require 'cl) |
132 |
(apply 'mapcar* |
(apply 'mapcar* |
133 |
(erbnoc-special-quote-function fcn) |
(erbn-special-quote-function fcn) |
134 |
ls args)) |
ls args)) |
135 |
|
|
136 |
|
|
138 |
(defun fsi-mapcon (fcn ls &rest args) |
(defun fsi-mapcon (fcn ls &rest args) |
139 |
(require 'cl) |
(require 'cl) |
140 |
(apply 'mapcon |
(apply 'mapcon |
141 |
(erbnoc-special-quote-function fcn) |
(erbn-special-quote-function fcn) |
142 |
ls args)) |
ls args)) |
143 |
|
|
144 |
|
|