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
(import System.Windows.Forms.Clipboard) | |
(Clipboard/SetText "hi") |
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
(import java.awt.datatransfer.StringSelection) | |
(import java.awt.Toolkit) | |
(import java.awt.datatransfer.DataFlavor) | |
(defn to-clipboard [s] | |
(let [ | |
selection (StringSelection. s) | |
clipboard (.getSystemClipboard (Toolkit/getDefaultToolkit))] | |
(.setContents clipboard selection selection))) |
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
(ns gems) | |
(def unique-by | |
"inverts the range of f" | |
[f s] | |
(vals (zipmap (map f s) s))) | |
(defn decompose-map | |
"nested map structure -> list of 'address vectors'" | |
([m] (decompose-map [] m)) |
NewerOlder