Loading [MathJax]/extensions/tex2jax.js

2010年7月19日月曜日

Generate a random permutation of the elements of a list

;; P25 (*) Generate a random permutation of the elements of a list.
;; Example:
;; * (rnd-permu '(a b c d e f))
;; (B A D C E F)
;; Hint: Use the solution of problem P23.
(require "p23.ss")
(define (rnd-permu lst)
(rnd-select lst (length lst)))
view raw p25.ss hosted with ❤ by GitHub

0 件のコメント:

コメントを投稿