---
title: "Discussion on \"What is lexical scoping?\" | Hashnode"
description: "Discussion on \"What is lexical scoping?\". Here's how we can define a simple sqrt function in Scheme:\n(define (sqrt x) \n  (sqrt-iter 1.0 x))\n\n(define (sqrt-iter guess x)\n  (if (good-enough? guess x)\n      guess\n      (sqrt-iter (improve guess x) x)))\n\n(define (good-enough? guess x)\n  (< (abs ..."
url: "https://hashnode.com/posts/what-is-lexical-scoping/6370d6aace344353eb18a493"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is lexical scoping?](https://blog.macieksitkowski.com/what-is-lexical-scoping?utm_source=hashnode&utm_medium=feed)

Here's how we can define a simple sqrt function in Scheme: (define (sqrt x) (sqrt-iter 1.0 x)) (define (sqrt-iter guess x) (if (good-enough? guess x) guess (sqrt-iter (improve guess x) x))) (define (good-enough? guess x) (< (abs ...

Nov 13, 2022 · 2 min read · blog.macieksitkowski.com  
Read the article

-   [#scheme](https://hashnode.com/tag/scheme)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Maciek Sitkowski](https://hashnode.com/@sitek94)

@sitek94 · Poland

  
[View profile](https://hashnode.com/@sitek94)

mostly frontend

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
