Skip to content
View in the app

A better way to browse. Learn more.

Opusmodus

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

looping get-events of bar n

Featured Replies

I'm stuck. Why does the first example work but not the second? Thanks!

(setf v1 '((-w h a4 d4)
           (h f4 e4 d4 q a4 g4)
           (q f4 g4 e a4 bb4 c5 a4 q bb4 h a4 q g4)
           (h a4 bb4 w a4)))

First example:

(loop for n from 1 to 4
      collect
        (get-events '(1 2 (2..4)) v1)) ;; "works"

Second example:

(loop for n from 1 to 4
      collect
        (get-events '(1 n (2..4)) v1)) ;; doesn't work, why?

This is the error message:

Error: In 1- of (n) arguments should be of type number.
  1 (continue) Return a value to use.
  2 Supply a new argument.
  3 (abort) Return to top loop level 0.

 

(loop for n from 1 to 4
      collect
        (get-events (list 1 n '(2..4)) v1))

 

Jesper

  • Author

Thanks Jesper, works like a charm! 🤩

;;asign 3 variables a, b, and c to 1, 2 and 3

(setf a 1 b 2 c 3)

(list a b c)
=>(1 2 3)

'(a b c)
=>(a b c)
 

Jesper

Yes, but macros and backquote are a bit harder to understand.

 

Jesper

 

 

29 minutes ago, jesele said:

Yes, but macros and backquote are a bit harder to understand.

 

Jesper

 

 

indeed, you are right. I agree for macros but this simple example of use of backquotes list and comma to evaluate is not too difficult I think and very elegant.

Create an account or sign in to comment


Copyright © 2014-2026 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy

Account

Navigation

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.