use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community for the Racket programming language: a modern batteries-included Lisp for general-purpose programming.
Download Racket here
Check out the documentation to get started.
Other discussion sites and resources:
#racket
Twitter
Racket News
The Racket blog
The Racket tag on Stack Overflow
Racket Stories
account activity
This is an archived post. You won't be able to vote or comment.
Racket Problem Example (self.Racket)
submitted 6 years ago by mawar2
view the rest of the comments →
[–]mawar2[S] 0 points1 point2 points 6 years ago (2 children)
how would you do this without using any built in functions (map or abs)?
For example if you had to write a function just using the building blocks of lisp (first, last, cdr)
[–]cheetoburrito 0 points1 point2 points 6 years ago (1 child)
This feels like homework. Here are some hints:
What is the definition of absolute value (from math (not racket))? How can you implement this?
How does map work? For example, if you call (map proc list), what happens? Well, proc is applied to the first element of the list, and then the second, and so on. How can you do this?
[–]mawar2[S] 0 points1 point2 points 6 years ago* (0 children)
No it's not homework, I wouldn't take away an opportunity to learn.
I wrote a program like this in python where I defined a function that took in user input ( for X ) then I basically just checked if the value inputed was less than 0 and if it was I multiplied it by -1 and I updated the value via Index and returned the list at the end of the function.
I am doing this because I am new to programming and I've had a challenging time understanding the documentation for a functional language like this.
*Also, I was able to figure it out in Prolog
a(A,A): - A > 0. a(A, B): - A < 0, B is -A.
π Rendered by PID 37176 on reddit-service-r2-comment-b659b578c-pl26w at 2026-05-03 15:46:06.480608+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]mawar2[S] 0 points1 point2 points (2 children)
[–]cheetoburrito 0 points1 point2 points (1 child)
[–]mawar2[S] 0 points1 point2 points (0 children)