Skip to content

Instantly share code, notes, and snippets.

View priyatam's full-sized avatar

Priyatam Mudi priyatam

View GitHub Profile
priyatam / inference.rkt
Created May 24, 2017 19:04 — forked from jrslepak/inference.rkt
Type inference in Typed Racket
#lang typed/racket
;;; Typed Racket version of Martin Grabmü̈ller's "Algorithm W Step by Step"
;;; This is my first use of Typed Racket. I am looking to change this from
;;; following Haskell idiom to following Racket idiom.
;; An expression is a variable, a literal, an application,
priyatam / machine.clj
Created November 20, 2015 06:19 — forked from zahardzhan/machine.clj
Turing machine in Clojure
;;; -*- mode: clojure; coding: utf-8 -*-
;;; author: Roman Zaharov <>
(ns clojure.turing-machine.machine)
(in-ns 'clojure.turing-machine.machine)
(defn convert-rules [rules]
(apply conj [] (for [rule rules :let [[state read jump write move] rule]]
{:state state :read read :jump jump :write write :move move})))
;; Schema
;; poem
[{:db/id #db/id[:db.part/db]
:db/ident :poem/short-url
:db/unique :db.unique/identity
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db.install/_attribute :db.part/db}
{:db/id #db/id[:db.part/db]