Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#lang racket
(struct fix-tag (tag contents))
(define fix-soh (string (integer->char 01)))
(define (compute-checksum tags)
1)
;; creates tag string with SOH attached
(define (create-tag id contents)
(string-append (string-join (list id contents) "=") fix-soh))
(define (create-msg tags)
(let ([msg-partial (string-join tags fix-soh)]
[msg-checksum (compute-checksum tags)])
(string-append msg-partial fix-soh)))
(define test-msg (string-join '("8=FIX4.2." "10=341") fix-soh))
test-msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.