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.

Featured Replies

works fine:

(rnd-replace '(123) '(1 2 3 4))

=> (1 2 3 123)

 

don't work ... why?

(rnd-replace '(123) '(1 2 3 4) :exclude '(2 3))

=> 

> Error: The value 1 is not of the expected type list.
> While executing: pos-rep, in process Listener-1(6).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.

section and exclude works with lists not on a list.

 

Arguments and Values:

 

section            an integer or a list of integers. Selected list or lists to process. The default is NIL.

exclude            an integer or a list of integers. Excluded list or lists from process. The default is NIL.

  • Author

okay, i see... i will modify it for myself

thanx!

  • Author

i needed something like that..

regards

andré

(defun rnd-replace/user (item sequence &key (exclude 'nil))
    (loop for i in sequence
      with val
      with pos = (position (car (loop 
                                  do (setf val (nth (random (length sequence)) sequence))
                                  when (null (member val exclude))
                                  collect val into bag
                                  when (= (length bag) 1)
                                  do (return bag))) 
                           sequence)
      for cnt = 0 then (incf cnt)
      when (= cnt pos)
      collect (rnd-pick item)
      else collect i))

(rnd-replace/user '(123 987) '(1 2 3 4 5) :exclude '(1 5))

 

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

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.