This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang typed/racket | |
;;; Typed Racket version of Martin Grabmü̈ller's "Algorithm W Step by Step" | |
;;; http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.65.7733 | |
;;; 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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- mode: clojure; coding: utf-8 -*- | |
;;; author: Roman Zaharov <[email protected]> | |
(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}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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] |