Is there a ready made lisp macro that allows chaining (piping) of functions? I couldn't find one. I'll try to explain what I mean with this example.
Instead of using let* with lots of unused intermediate variables like this:
(let*
((var1 (f1 x y))
(var2 (f2 x var1))
(var3 (f1 var2 z)))
var3)
I would like to have it written l...
I want to destory my previously shown frame when a certain event is triggered.
I can't find anything regarding this in the reference manual.
...
According to SICP section 1.2.6, exercise 1.22:
Most Lisp implementations include a primitive called runtime that returns an integer that specifies the amount of time the system has been running (measured, for example, in microseconds).
I'm using DrScheme, where runtime doesn't seem to be available, so I'm looking for a good substi...
How to use nth function in lisp if my my variable is combination of list and cons-cell
for eg:
(setq aa '(1 2) )
(nconc aa (+ 1 2))
this return me (1 2 . 3)
when i say (nth 1 aa) it returns 2
but when i use (nth 2 aa ) it throws error
...
I edit my LaTeX files in Emacs using AUCTeX. To compile, I press C-c C-c, which will run pdflatex root, if root.tex is the file in the current buffer.
But what if I want it to run pdflatex on a file that is not in the current buffer?
For example, I am editing an included .tex file chapter2.tex and press C-c C-c. The command I want it ...
hi.
I would like to implement automatic collapse of compilation buffer to small size (but not close at a delete windows), such that upon successful compilation to window is shrunk to minimum size.
get-buffer-create returns a buffer. how can I shrink-window on window associated with that buffer? also, is there a way to store previous w...
Possible Duplicate:
Whats so great about Lisp?
What is it that makes Lisp so special? Why is it repeatedly held up as an example of what a programming language should be?
I've got a pretty deep CS background here, if you need to get technical, by all means do so. Still, I think what I'm asking is how does working with Lis...
Why do Lispers format their code like shown in sample 1 instead of as shown in sample 2? To me (and I guess, to most others coming from different programming backgrounds than Lisp), the formatting shown in sample 2 would be easier to read. Is there any particular reason why Lispers prefer the sample 1 style?
Sample 1
(defun factorial ...
hi.
How do I tell in emacs window orientation, e.g. if it was created by vertical or horizontal split? alternatively, how can I tell if window can be resized vertically or horizontally?
on a related note, is there a tutorial for programming emacs windows, e.g. size, buffers associated, properties, etc.?
Thank you very much.
was able ...
From the reviews 'The Little Schemer' looks like the book to learn functional programming techniques and theory/reasoning. I wanted to ask if this book requires me to learn basic Scheme first? or I can get the hang of it in the middle?
Some background about myself to give depth to my question:
I'm planning to have a crack at this book, ...
hello
How do I specify a function which has optional numeric prefix, if not, it prompts for a number? basically how goto-line behaves?
(defun my-function(&optional n)
; I have tried
(interactive "N") ; reads string, no prompt
(interactive "p") ; defaults to one
(interactive (if (not n) (read-number "N: "))) ; runtime error
...
hi
How can I override emacs function with my own implementation for a specific mode?
example/reference would be great
Thanks
...
hey
I am trying to learn lisp, using emacs dialect and I have a question.
let us say list has some members, for which predicate evaluates to false. how do I create a new list without those members? something like { A in L: p(A) is true }. in python there is filter function, is there something equivalent in lisp? if not, how do I do i...
I'm working through Practical Common Lisp presently
http://www.gigamonkeys.com/book/
It's an excellent book with some practical assignments towards the end, but I'm looking for basic problems that explore the use of functions, variables and macros. Can anybody suggest a suitable resource to work through in order to reinforce the conce...
I've heard a lot about functional programming languages and I'm willing to learn one. I guess it will be mostly for fun, however, I hope it will improve my programming skills.
I have mostly C#/.NET background, so my first choice is to learn F# (because of .NET and familiarity with Visual Studio). On the on other hand, I wonder if F# has...
Hi,
I've been writing some simple test cases for one of my assignments, and have built up a bit of a test suite using macros. I have run-test and run-test-section and so on.
I'd like run-test-section to take a number of parameters which are run-test invocations and count up the number of PASSes and FAILs.
run-test returns T on PASS, an...
hey guys
I have tried to search Google and look in the manual, but still cannot find how to get major mode of a buffer object. Can you help me with an example or a reference. Thanks
only solution I could find was to query major-mode after changing the buffer and then changing back to original buffer. Is there a better way to do it?
...
Hey guys,
sorry to overflow with so many questions.
I have the following:
(defun recursive-function (string) "returns list of strings"
;I am trying to return flat list
; create list L
(append (mapcar 'recursive-function L)))
But since recursive-function returns a list, I end up with a list of a list of a list..., whereas I want just ...
I'm trying to change the value of an Editable-Text control in Allegro CL (version 8.0.1) by clicking a Default-Button.
I've read about (setf value) but haven't found any examples.
The function I have ttached to the on-click event is the following
(defun form1-default-button-2-on-click (dialog widget)
(declare (ignorable dia...
hello
I finally started learning functional languages (emacs lisp) and it makes explicit distinction between functions and special forms such as flow control , for example if.
Is there a fundamental/theoretical reason why special forms are distinct from functions? do any languages provide functional if?
Thanks
...