Skip to content

Commit

Permalink
(docs) update info that __code__ contain a lambda expression
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 18, 2024
1 parent fb5a979 commit c44c0bc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/docs/lips/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@ source code of the procedure that you can modify:
(set-cdr! r (list (+ (cadr r) 1)))))
```

:::info

The `__code__` property always contain a lambda expression, because:

```scheme
(define (foo x) ...)
```

is an alias for:

```scheme
(define foo (lambda (x) ...))
```

:::

This procedure modify its source code. Each time you execute this function it will run one more
times.

Expand Down

0 comments on commit c44c0bc

Please sign in to comment.