
Okay, thanks; that makes sense.

What is an efficient way to find the definition of a built-in function? In this case, I’m looking for append
, so I first went to https://github.com/racket/racket/blob/master/racket/collects/racket/list.rkt\|racket/collects/racket/list.rkt , next I tried https://github.com/racket/racket/blob/master/racket/collects/racket/private/list.rkt\|racket/collects/racket/private/list.rkt I thought I’ve noticed a “jump to definition” in DrRacket before, but that’s not an option for append

I suppose we’re just using the Chez implementation of append
, so I’ll dig around there next …

In BC append
is a C function. My guess is that in CS it is a Chez Scheme primitive.

It would be awesome to have a link from the docs.

I.e. there is no Racket definition of append
.

That’s fine, I still need to check on performance, so I’ll need to track down the C function since I’m on BC at the moment.

I think, I know where it is.

if you look at the URL for the docs, you can see that it’s provided by '#%kernel
which means it’s not defined in Racket

Cool - thanks @samth - checking on a few others, the URL provides some nice hints for locations


Here’s the BC definition: https://github.com/racket/racket/blob/master/racket/src/bc/src/list.c#L1512

Thanks. I think parsing the docs URL will help for future searches.

If the URLs are regular enough, having a direct link to github seems like a possibility.


Yes, that’s something I’ve wanted to do. There’s already infrastructure that handles package information, to make the link to the github source of the document itself appear.