Lisp - How can I check if a list is a dotted pair?
How can I check if a list in lisp is a dotted pair?
CL-USER 20 : 3 > (dotted-pair-p (cons 1 2))
CL-USER 20 : 3 > (dotted-pair-p '(1 2))
CL-USER 20 : 3 > (dotted-pair-p '(1 2 3))
I tried checking if
length=2 but got error:
CL-USER 28 : 1 > (= (length (cons 2 3)) 2)
Error: In a call to LENGTH of (2 . 3), tail 3 is not a LIST.
I want to learn Common Lisp and have installed emacs (24.3) and slime via the emacs package manager. In the slime REPL syntax highlighting doesn't work. When I start Lisp-Mode (while in the slime REPL
In common-lisp, I want to implement a kind of reference system like this: Suppose that I have: (defclass reference () ((host) (port) (file))) and also I have: (defun fetch-remote-value (reference) ...
How can I check if an element in the list is an empty list:  ? I've got the following: display_degrees([A,B,C,D]):- write(B). display_degrees([A,B,C,D]):- B==, nl,write('has no degree'), nl, !. W
Can you use jQuery to select elements 2, 3, 6, 7, 10, 11, 14, 15 and so on? That is, select two elements, leave two, select the next two, leave two, etc.
We have custom link with dotted underlined style. How can I reduce the gap? Currently padding: 0; and line-height is not working.
In Emacs Lisp, how do I check if a variable is defined?
Let's say that I've got a : #include <utility> using namespace std; typedef pair<int, int> my_pair; how do I initialize a const my_pair ?
I'm trying to write a Common Lisp function that will give me all possible permutations of a list, using each element only once. For example, the list '(1 2 3) will give the output ((1 2 3) (1 3 2) (2
I need to center some text between a dotted border vertically and horizontally as in below image : I have a very simple fiddle which attempts to achieve this. How can the css be amended to appear as
I'm using the SHAutoComplete() function from the Shell Lightweight Utility Functions library to enable path auto completion for edit fields in a modal dialog. The dialog should close when the Esc key
I have table that doesn't need a specific field to be the primary key. I could add a auto-increment ID field, but it won't be used at all within database queries... Can I make a UNIQUE KEY to be prima
When I open my form, I'm adding a bunch of rows to a DataSet that is bound to a DataGridView. Later on, when I'm enumerating the rows in my DataGridView, I'd like to have access to some of the data th
I want to see if the two z,y that make a pair is already exist inside my ArrayList. I know that each time I make a new reference of pair and that will be store inside an ArrayList. But somehow I want
In the Visual Studio (2010) Solution Explorer, what do the dotted ghost folders mean? I can still open them up and open contents within them, so how do they differ from the rest of the normal yellow
I'm using Eclipse with PyDev for my Django project. Everything fine except when editing html, there dotted underline for each line of HTML. How can I remove these dotted line? This is my screenshot.
Given the everything's-a-list homoiconic approach to code and data in Lisp, I'm having a hard time understanding how to manipulate alists in Emacs Lisp. In particular, how can I convert an alist to
Active hyperlink texts are highlighted with dotted border. When using effects on such hyperlinks (fadeIn/fadeOut) it produces strange effects. How do I disable/remove the dotted border?
I recently started learning Common Lisp using SBCL. How can I compile my Lisp programs into a Windows binary?
I want to start with alphabet in textbox. How can I check textbox is begining only alphabets ? For example: N4534 -- True NN435 -- True 2N645 -- False ?N645 -- False Thanks
I need to write a function in Common-Lisp that takes a list of lists and returns a list containing all the possible combinations of the elements from the sublists. So, for example calling the function
Setting arbitrary attributes from outside works for normal classes, but not for internal objects like strings?! How can I check if I'm allowed to set arbitrary attributes?
How can I check the security of my website? What are the best ways to avoid security holes?
How do I check if a list of characters are in a String, for example ABCDEFGH how do I check if any one of those is in a string.
I would like to programmatically check whether a string can be pronounced or needs to be spelled out. For example, internationalization can be read out, but i18n cannot, nor can hhdirgxzf. I can think
I want to call some Windows API functions to manipulate Windows Input Method Editor to make my Emacs an IME-aware application. How can I call Windows API functions using Emacs lisp? Thank you!
In Firefox (current version 14.0.1) I get a dotted outline around some <area> tags that I have created here (http://mediabrands.com.au/). Not only do I see a dotted line, but once it has appeare
i have to delete all the double elements from a list in lisp.. here is an example: (A B C D E A A B F G A) => (A B C D E F G) How can i do this?
I am coming from Lisp and wish to develop an Iphone app. I was hoping to hear from other lisp or python developes on how Objective-c compares to Lisp in terms of abstractions, such as closures, first
I want to Count the number of repetitions of each element in the list in lisp. e.g. (1 2 1 1 3) should give the output “element 1: three times” Any solution for this ???
I am new to lisp and working on a homework problem to flatten a nested list. I have my funciton working except it needs to 'remove' dotted pairs. So given (1 (2 3) (4 . 5) ((6 7) (89))) my function sh
How can I remove nested parentheses recursively in Common LISP Such as (unnest '(a b c (d e) ((f) g))) => (a b c d e f g) (unnest '(a b)) => (a b) (unnest '(() ((((a)))) ())) => (a) Thanks
I am writing java code. which will work on windows and linux. some code are depend on platform base how can i check my application running on which platform ?
Can anyone tell me how many maximum devices can we pair via Bluetooth to android devices at a time.....i googled every where but i didn't get the right answer.
How do I get a complete list of non-interactive functions that I can use in Emacs Lisp? The interactive ones are easy enough to find in the help system, but I want a complete list of all the other fun
I have a file in which every line is an integer which represents an id. What I want to do is just check whether some specific ids are in this list. But the code didn't work. It never tells me it exist
How can I can I check if a post has a thumbnail and if does do something? If doesn't do something else. This is what I have: <?php if(have_posts()) : ?> <?php while (have_posts()) : the_post
I want to define a method that will specialize on an object of array type with unsigned byte 8 elements. In sbcl, when you (make-array x :element-type '(unsigned-byte 8)) the object class is implement
I have a list of 50,000 paths and I need to check if a file exists against each of these paths. Right now, I am verifying each path independently like this: public static List<String> filesExist
How can I obtain a negative random integer in common lisp? Is there some function in standard lib? ---- updated on 2012/06/15 ---- Perhaps I did not descript my question correctly. What I actually wan
Can a typical Lisp dialect solve problems using the bottom-up dynamic programming approach? (Please note: I'm not talking about memoization which, as far as I understand, is trivial using any Lisp
I'm working on a project that needs unique keys and values so I decided to use maps. Everything works expect for the case where someone may want to change the key value. I'm not sure why, but it cause
Anyone have any ideas on how to do this... reverse is too slow, and I want to avoid using the function. Basically I want to be able to return true if something like '(a b b a) comes up or '(a b c d c
How to check if a specific list is sortable? Like $('#list').is(':sortable')... ? If we will use if ($('#list').sortable()) then the list will be made sortable again and not check if actually it is
Possible Duplicate: How does one reduce a list of boolean values in Common Lisp? i have a list as follows: '(T Nil T T) I want to apply the and-operator on that list. So that it only gives T when al
I wrote a java program that using the SVNKit. The timestamp of checked out file is system time ,instead of the commit time 。How can I check out file with the commit time.
I have a List of Maps. I want to check if any of the Maps contains a specific key value pair. myKey = myValue What is the most Groovy way to do this?
Is there a way to retrieve the type of a CComboBox? I need to know if it is a Dropdown or a Drop List. I've tried the following: if (m_MyComboBox.GetStyle() & CBS_DROPDOWN) // do some stuff
I have a pair of values. I don't want a <key, value> pair. I want a <value,value> pair. I have created a select tag. and its options are the pairs. <option value=value1 >value2<
I can do: map<char*, int> counter; ++counter[apple]; But when I do: --counter[apple] // when counter[apple] ==2; I got debugger hung up in VS 2008. Any hints?