Recent Tweet
- So on Kimmel, the joke that kids thought Pandora was a country didn't for me (it was from Avatar), I thought it was a music app. 15 hours ago
Let’s say you have a list of points that are put together with cons. You can car to get the x-value and cdr for the y-value. Now let’s say you need to add the values up, for instance, all the x-values. You can do it really easily with a neat function that’s included in Scheme. [...]
SSH’ing through my MacBook Air to Ubuntu is great and all, but nothing beats running Scheme locally and natively. When I followed the instructions scattered around the Internet on Scheme installation, I would usually end up with this error. scheme: can’t find a readable default for option –band. searched for file all.com in these directories: [...]
When I was using scheme in class, I found it annoying to use the Scheme interpeter, make a bunch of mistakes and have a heap of error messages clogging the top part of the window. Traditionally, if this was done in the terminal, you could clear the screen with a command. In bash, everyone knows [...]
Logic often requires you to find the lowest or highest value in an array. That’s easy just about everywhere. Sometimes though, you need to get the nearest number, and that can be a slight challenge, espeically in Scheme. I wrote a little procedure called get-nearest+ that given a value, it will attempt to find the [...]
Scheme has a built in procedure for splitting lists, but usually you can’t use unlearned methods in labs or in homework yet. So this is a partial solution for splitting a list at a particular index. Here’s the algorithmic process. Add the first element from the old list to the new list Remove the first [...]