user35202
user35202

Reputation: 419

define and assign function call result in racket

I would like to assign the result of a function call (a list) to some var/name. I tried

(define somelist (call-a-function arg))

but when I do

(display somelist)

it prints #procedure

What is the best way of doing this?

Upvotes: 0

Views: 144

Answers (1)

Óscar López
Óscar López

Reputation: 236004

It's a safe bet that this:

(call-a-function arg)

Is returning a function, not a list as you assumed. That's why you're getting a #procedure printed on-screen. Check your function, make sure it returns the appropriate value.

Upvotes: 4

Related Questions