How we can achieve variables that we defined in the (local ...) syntax in Scheme开发者_运维技巧?
I would like to be able to test whether a variable is defined, prior to accessing it. I like to have a global that specifies a \"debug level\". If debug level is 0, no extra output is given. When gr
I\'d like to have a version of lambda, called lambda-r, from within which you can return. An example:
I\'m a big fan of functional programming in general, Schemes in particular, and PLT-Racket ideally. I am wondering what concrete steps are likely to get me into 开发者_如何学编程a position where codin
I\'ve been trying to learn some programming on my own by working through the textbook How to Design Programs for Scheme. I\'ve gotten through everything until now. Here\'s the problem:
I\'m just playing around with scheme/lisp and was thinking about how I would right my own definition of average.I\'m not sure how to do some things that I think are required though.
I\'ve been learning scheme, and I just realized that I don\'t really know how to properly comment my functional scheme code. I know how to add a comment of course - you add a ; and put your comment af
I am learning Scheme and I am trying to generate permutations with repetitions of certain size. For example, given n=4 and set S = {a, b, c, d, e, f}, I\'d like to generate all possible permutations:
What is the difference between CODE SNIPPET 1 and CODE SNIPPET 2? ;CODE SNIPPET 1 (define i 0) (do () ((= i 5)); Two sets of parentheses
I am confused as to how car and cdr work on lists.Here is an example of what I have tried: (define sample (read))