themetaschemer/malt

`random-tensor` doesn't work well with overridden operator provided in the same package.

Closed this issue · 1 comments

In chapter 13, frame 60, where random-tensor is defined, the s-expression doesn't work out of the box:

#lang racket
(require malt)
;; (random-tensor 0.0 (/ 1.0 2.0) '(6 4)) ;; => would fail
(random-tensor 0.0 0.5 '(6 4))

It might be due to the / used here has been overridden by the malt package and random-tensor:

#lang racket
(require malt)
(random-tensor 0.0 (ρ (/ 1.0 2.0)) '(6 4)) ;; => works

From interlude I onwards, the reader would expect all primitive operators to be their extended version, so the print in the textbook in frame 60 lacks the context; from a library user's perspective, one would expect random-tensor to hide the inner workings of extended functions here as well.

Thanks for reporting. Fixed in 0e1c2c5