This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; minimial-cedet-config.el --- Working configuration for CEDET from bzr | |
;; Copyright (C) Alex Ott | |
;; | |
;; Author: Alex Ott <alexott@gmail.com> | |
;; Keywords: cedet, C++, Java | |
;; Requirements: CEDET from bzr (http://cedet.sourceforge.net/bzr-repo.shtml) | |
;; Do checkout of fresh CEDET, and use this config (don't forget to change path below) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let's suppose that there is a method Set.pickOne() | |
# which picks randomly an element from a given set | |
# We also introduce Set.empty which is the neutral element for the union operation (+) | |
function power_set(items) | |
if items.empty | |
return Set.empty | |
set <- copy(items) | |
e <- set.pickOne() | |
ps <- power_set(set.remove(e)) | |
ps <- ps + add(ps, e) |