Skip to content
View in the app

A better way to browse. Learn more.

Learn more

length-invert** (works with ties)

Featured Replies

;;; FUNCTION: for some coding-cases i needed THIS function, to keep the OMN-notation 
;;; and not to change to RATIO (otherwise i got strange results in NOTATION because the "ties are gone")

(defun length-invert** (length-val)
  (append (compress (list '- length-val))))

;;; EXAMPLES

;;; new => keeps OMN
(length-invert** (car '(q e4 mp)))
=> -q

; in this case i wanted to keep the format with tie
(length-invert** (car '(3q_q e4 mp)))
=> -3q_q




;;; original => changes to ratio
(length-invert (car '(q e4 mp)))
=> -1/4

; no tie here! i was in trouble :-)
(length-invert (car '(3q_q e4 mp)))
=> -1/3

 

Create an account or sign in to comment

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.