# Typed Racket interface to the generic graph library

**URL:** <https://racket.discourse.group/t/typed-racket-interface-to-the-generic-graph-library/546>\
**Category:** Show & Tell\
**Tags:** typed-racket, graph\
**Created:** [January 10, 2022, 5:29pm UTC](https://racket.discourse.group/t/typed-racket-interface-to-the-generic-graph-library/546 "2022-01-10T17:29:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scolobb](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/scolobb/32/108_2.png) [@scolobb](https://racket.discourse.group/u/scolobb)\
**Post date:** [January 10, 2022, 5:29pm UTC](https://racket.discourse.group/t/typed-racket-interface-to-the-generic-graph-library/546/1 "2022-01-10T17:29:01Z")

</div>

Hello all,

I have just finished an incomplete Typed Racket interface to the [generic graph library](https://docs.racket-lang.org/graph/index.html). It allows using all the basic functions of the library, e.g.:

```scheme
#lang typed/racket

(require typed/graph)

(define g0 (undirected-graph '((a b) (b c) (c d) (d a))))
(coloring g0 5)

; Output: #hash((a . 0) (b . 1) (c . 0) (d . 1))

```

This library is based on Alex Knauth’s [answer on Stack Overflow](https://stackoverflow.com/a/65416020).

The following features are not currently covered:

- generic graph interface,
- generic queues (from the package [gen-queue-lib](https://pkgd.racket-lang.org/pkgn/package/gen-queue-lib)),
- macros.

I may work on adding these in the future, but it is low priority for me as of today.

Feel free to contribute or give feedback!

–  
Sergiu
