100 Topics
a. create a list that stores the courses that you are taking this semester where the courses are stored in sublists as (designator number) such as (csc 375) so that your list will look like this: ((csc 375) (his 100) (cit 140) (csc 402) (eng 200)) and then create 3 …
Hello all, I'm going for my masters and for the first time ever I am having a hard time with a programming language. This scheme is incredibly hard for me for some reason. The assignment is as follows: I have a list, make a function that returns false only if …
hi all, trying to write a function nonlat? which returns true if the given list does not contain any atoms. so an empty list would be a nonlat and return true. the tests i'm supposed to use are: (nonlat? '(a b c)) (nonlat? '(a (b) (c))) (nonlat? '((a b) ((c)) …
anyone here know lisp? i'm trying to code a trie in list. i know what to do as i already did it in ruby and python. i just need some guidance with doing the same. reply to this thread if you know lisp or contact me directly at< snipped email> …
anyone know of a free ANSI lisp compiler for download? I want to learn some lisp but I don't want to use REPL in emacs anymore... I want to write source code and compile it haha.
Hi! I am new to Scheme and I need help with this problem. Split and return a list of two lists at a given element; call it (split List Element). The given element should be the head of the second list. (split ‘(2 3 4 6) 4) => ((2 3) …
Hello all, I had to write a program that would take a list and check for alternate atoms and list, if there were two atoms in a row, it would #f, same for two lists. I now need to make it #f for 3 in a row. This is what …
I have been learning DrScheme (Textual MzScheme) as my Pre-ILP. Is there any equivalent operations in list like string-ref, substring, string-set!, string, etc ?? Thanx
Hello, I need your help for the following application The app has to do with polynomial manipulation and my question is how can i manipulate both letters and numbers. in other words how can i collect together terms , e.g., (x + 1) + x → 2x + 1 rather …
Am a newbie at LISP and trying to search through a tree using the BFS and DFS and got this far and am not sure if what i did sets the goal node to "n" because its supposed to start from a to the goal node and return the path....cant …
i want to write a code which work like below (transform (+ - + - / + - + - + + + / + + + - - - / + + + - - - - +) >> +-+- +-+-+++ +++--- +++----+ That is, code transform which combines …
hi, i 'm trying to write a cards game in nothing but scheme. i found the very useful games/cards package, which allows to shuffle, drag and drop cards,... the problem is that i have to redefine the cards (the cards game doesn't use the normal 52 cards, but my own, …
So, I figured a fun little waste of time would be to write quicksort in scheme. I have my code below, poorly documented. Basically, it takes the first element as the pivot (for simplicity), and then there's a method which returns a pair which is ( (list of everything smaller …
Hi, I have heard that scheme can manage .txt files for some purposes, and also heard that its better to use strings if what to use files. In this moment I am programming this virtual inventory system to learn how to program in scheme. So well I made this "data …
Hi all, I'm using a common Lisp compiler and I don't know the syntax to get the node "NIGHT" from the list (((GOOD))((NIGHT))). Could someone help me? Thanks
I am trying to execute the code (append '(a b) '(c d)) in drscheme using lazyscheme and i am getting the following output: (a . #<promise:...cts/lazy/lazy.ss:453:38>). What is the problem? Thanks.
[COLOR=#555555]I am using common lisp for customizing CoCreate Cad software.[/COLOR] [COLOR=#555555]I am confused regarding the load function.[/COLOR] [COLOR=#555555] [/COLOR] [COLOR=#555555]The following command will load the indicated file:[/COLOR] [COLOR=#555555](load "c:\\temp\\testload")[/COLOR] [COLOR=#555555] [/COLOR] [COLOR=#555555]The following will load the 2nd item but the 1st item exists:[/COLOR] [COLOR=#555555](load "c:\\temp\testload" [/COLOR] [COLOR=#555555]if-does-not-exist[/COLOR] [COLOR=#555555](load "c:\\temp\\testload2")[/COLOR] [COLOR=#555555])[/COLOR] …
Hello every, I have a problem in scheme programming. I am begneer in scheme programming.I use Drscheme tool. my problem I want to write a program that spell in integer numbers without using (list or map) just a normal function that checks the parameter of the function if it a …
I am using dr. scheme and I need to retrieve the 2nd item in a list. is there a function like car that returns the second one instead of the first one?
hi, i was wondering if there are functions in lisp that lets me check if an object or defstruct object is certtain defstruct object as if if i have (defstruct (firstthing (:conc-name nil)) first second) (defstruct (somethingelse (:conc-name nil)) blah blah) and i instanciated (setf thing (make-firstthing :first '(a) :second …
I've been working on this basic DFS proof of concept for hours and just by reading the code I would swear on a stack of bibles that it's flawless and yet it flat out doesn't work. What the heck am I doing wrong? I'm 99% sure that the problem lies …
I'm working on an implementation of Conway's Game of Life as a way to learn Scheme, and I'm having trouble with the updater. I keep getting the message "The object () is not applicable" when I try to use the following. I could be missing something simple, and any advice …
Hi, can anyone tell me how to call Common Lisp from java.
I am trying to implement heap in CLisp. I have already done it by makin a linear data strcuture with no left / right pointers. But now I want to use a nested list format which contains (el () ()) at the highst level. The problem I am facing with …
Hey guys and gals!!! first time for me posting on this forum!!! I'm currently learning scheme and for some reason I can't seem to get anything to work correctly. I've been trying to define the union of 2 lists in scheme and its not working. I'm not sure how to …
Ok I have to write a program that creats an ADT to store a set of cards that are imput so that i can use the command (a-card rank suit) and (rank card) (suit card) to firstly construct the card and then return its rank and suit. Unfortunately I am …
I wrote a a program that calculates the volume of cylinders using named functions and un-named functions, however, i'm having trouble doing the same using the let-form in scheme. here's my program although it doesn't work [CODE](define main6(lambda () (let ( (volumec6 (lambda (d h) (let ( pi (3.14159265)) (* …
Hello I was wondering if someone could help me with a family tree function in scheme. What I have right now is: [code];;proper-blue-eyed-ancestor?: ftn -> boolean ;;consumes:an ftn ;;produces:a list of all the eye colors of the people you can get to ;;from that node (define (proper-blue-eyed-ancestor? a-ftn) (cond [(empty? …
How would you write your own begin expression, that would be analogous to the built in procedure in scheme?
I'm a student learning Scheme and we have been learning natural numbers in class. We have already done homework assignments on them and now some advanced problems have been posted for extra credit. There are two problems that deal with natural numbers and lists in scheme. I don't understand how …
[code] I need help in Dr scheme. i need to make it so that a string can be broken into the individual words ignoring punctuation. please help [/code]
I came accross this problem and I was wondering if anyone could help... Consider this data definition that a company uses to keep track of the substances it stores in its factory: [CODE];; A tank is ;; (make-tank string number) (define-struct tank (substance quantity))[/CODE]Some examples would be: [CODE](make-tank "oil" 25) …
Can anyone help me ? The question is : Write a function to parse a list (sequence) of symbols Determine if the sequence is valid by the following grammar: PROP ::= ATOM | PROP UNIOP | PROP PROP BINOP ATOM ::= 'A' | 'B' | 'C' | 'D' | 'E' …
Does anyone know about LISP Programming I am trying to make this program where I have 3 types of cars, which are ford bmw merc ford has focus and fiesta BMW has 1series and 2series and the merc has SK100 and SK200 well basically i am trying to put them …
Does anyone know about LISP Programming I am trying to make this program where I have 3 types of cars, which are ford bmw merc ford has focus and fiesta BMW has 1series and 2series and the merc has SK100 and SK200 well basically i am trying to put them …
Is anyone familiar with lisp programming? If so can you please respond back. I have a program due and it deals with lisp type checking! I would really appreciate it. ;)
I need some help... This might seem pretty simple to some people, but I'm really have difficulty figuring this problem out. I need to add two numbers on using the increment(1+) and decrement(1-) functions.. I have the logic for adding work however I need help printing NIL if the user …
I am new to scheme, and are learning it using Dr.Scheme, please help I came across this question, but have some trouble with it: A clock structure (define-struct Clock(hours minutes seconds)). Make a function that Consume a Clock structure and output the total seconds ;;this is what i did (define-struct …
[COLOR=#003399]program to read in the input file, a plain text file, word by word, and write to the output file a list of each word type together with a count of how many times that word appeared in the input file. [/COLOR]
Hi, I am a scheme newbie so any help or suggestion is appreciated. The follwoing function with the input '((kangaroo Australia) (Racoon USA) (Tiger Bangladesh[U][/U])) should return '(kangaroo Racoon Tiger) but instead it returns Error: attempt to call a non-procedure ('((kangaroo australia) (racoon usa) (tiger bangladesh))) What am I doing …
(function (lambda (example) (if (= 0 (aref example i)) nil T))) Why does this line of code give me an error that says: Free reference to undeclared variable EXAMPLE assumed special.
This is part one of a series I am sending to some of my friends. It teaches you how to make a pop-up window using scheme, and change the message of the window, position, size, content, etc. Part two will teach how to link windows together, make them visible, invisible, …
g'day all, this website is such a great resource but after browsing thru the forums I haven't been able to find the information I need. I am brand new to programming and have been asked to write a scheme program that counts words. Now, I know that I have to …
Hello every, I have a problem in scheme programming. I am begneer in scheme programming.I use Drscheme tool. my problem I want to write a program that spell in integer numbers without using (list or map) just a normal function that checks the parameter of the function if it a …
Does anyone know about LISP Programming I am trying to make this program where I have 3 types of cars, which are ford bmw merc ford has focus and fiesta BMW has 1series and 2series and the merc has SK100 and SK200 well basically i am trying to put them …
ok, so we have the load file function (i'm using clisp) you know the one that goes.. (load "filename.lisp") well...i was running a function that i'd made, and as one of the parameters accidently typed (load "filename.lisp") and now. whenever i wanna "really" use the load file function, it jumps …
Hello, the listp function doesn't apply the full "list" rules. Example (cons 1 ( cons 2 3 )) Isn't a list as the definition goes: * either an empty list (nil) * or a cons cell that has a list for a cdr altough listp yelds true to that "list" …
I am having some trouble understanding pure LISP. I am confused about the concepts of atoms and flat lists vs. any lists. I have a problem that should be fairly simple, although it uses recursion, which I am not very familiar with using. The function takes 1 argument which can …
I have also compiled some notes on Dr Scheme, in an attempt to get my little brother to do something besides play Runescape. I know these are incomplete, but here they are just the same: [url]http://download.plt-shceme.org/doc/208/hmtl/mred/index.htm[/url] Notes on Mr. Ed relevant to my work: (Section One) Create a Frame: (define …
Does anyone know or use the Mr. Ed or Pretty Big portion of Dr Scheme? I have been fooling around with the language for about three months, and after a one month dry stretch, I seem to have forgotten how to use sub routines. :( Can someone please help me? …
The End.