Questions tagged [sisc]

SISC is short for Second Interpreter of Scheme Code, in reference to its predecessor LISC, the Lightweight Interpreter of Scheme Code. SISC depends on Sun Microsystems' Java programming language platform. This runtime environment allows SISC to provide many extensions and libraries such as networking, exception handling, a module system, and a Java foreign function interface.

6 questions
4
votes
1 answer

What is the main difference between SRFI 40 (deprecated) and 41?

In SRFI 40 we can see it is deprecated and superseded by SRFI 41. I'm using SISC where SRFI 40 is present but SRFI 41 isn't. I would like to know the main difference between them and can I use the SRFI 40 normally without fear?
Felipe
  • 16,649
  • 11
  • 68
  • 92
1
vote
1 answer

Recursive function not working '"Wrong type argument in procedure car"

I am writing a recursive function that takes an element A and a list L and returns a list equal to L, but with every occurrence of A removed. Here is what I've written: (define (remove A L) (cond ( (eq? A (car L)) (remove A (cdr L)) ) …
KOB
  • 4,084
  • 9
  • 44
  • 88
1
vote
2 answers

Recursive function not working as planned

I am writing a function in Scheme that is supposed to take two integers, X and Y, and then recursively add X/Y + (X-1)/(Y-1) + ...until one of the numbers reaches 0. For example, take 4 and 3: 4/3 + 3/2 + 2/1 = 29/6 Here is my function which is not…
KOB
  • 4,084
  • 9
  • 44
  • 88
1
vote
1 answer

How can I convert a string into exact number in Scheme Lisp?

For example, I have this string: "6119726089.12814713" If I do (string->number "6119726089.12814713") - using the SISC implementation the result is 6.119726089128147e9 - and in Guile implementation is 6119726089.128147 but I would like an exact…
Felipe
  • 16,649
  • 11
  • 68
  • 92
0
votes
1 answer

Replacing the first occurence of an element in a list

I am writing a function replaceFirst(X Y L) which replaces only the first occurrence of X with Y in the list L. Here is what I have done so far: (define replaceFirst( lambda (X Y L) (cond ( (null? L) '() ) ( (equal?…
KOB
  • 4,084
  • 9
  • 44
  • 88
0
votes
2 answers

How to make a "define" that accepts string in the first parameter in SISC Scheme?

Let's call this function "dynamic-define". Basically I want to write a macro or lambda that works like this: $ (dynamic-define "variable" 123) $ variable $ => 123 I tried it: (define-syntax dynamic-define (syntax-rules () ((_ string…
Felipe
  • 16,649
  • 11
  • 68
  • 92