본문 바로가기

프로그래밍 언어 노트/Clojure

(28)
[Clojure] Clojure 웹 드라이버 API (wait-visible {:fn/text "고객센터"}) github.com/igrishaev/etaoin igrishaev/etaoin Pure Clojure Webdriver protocol implementation. Contribute to igrishaev/etaoin development by creating an account on GitHub. github.com 쉽게 말하면 셀레니움 같은거이다. clojure 에서 쉽게 webdriver 를 사용할수있는 라이브러리 간단하게 사용법을 살펴보면 드라이버 설정 (def driver (chrome)); chrome 사용 (def driver (chrome-headless)) ;headless (def driver (chrome-headless ..
[PS/Clojure] HackerRand - Algorithms - Construct the Array DP 를 사용하는 Sherlock and CostConstruct the Array 오랜만에 아무 힌트없이 풀었다 크흠... Construct the Array | HackerRank Find the number of ways to construct the array such that consecutive positions contain different values. www.hackerrank.com Lee-WonJun/ProblemSolving 알고리즘 세미나 . Contribute to Lee-WonJun/ProblemSolving development by creating an account on GitHub. github.com (defn exp [x n] (reduce * (repeat n x..
Clojure로 만든 간단한 PDF 내용 수정 프로그램 https://github.com/Lee-WonJun/pdf-string-replacer Lee-WonJun/pdf-string-replacer A simple PDF string replacement program written in clojure - Lee-WonJun/pdf-string-replacer github.com PDF 내용에서 string 을 다른 string 으로 치환해주는 프로그램, 자바코드를 포팅한것에 가깝지만 좀더 clojure 스럽게 작성하였다. 한글 pdf 문서는안되고 영어만 되는듯 하다.
[Clojure] Clojure 와 Haskell 의 DSL 비교 https://www.quora.com/Which-language-is-better-for-creating-DSLs-Clojure-or-Haskell Which language is better for creating DSLs, Clojure or Haskell? Answer (1 of 4): While I don’t have too much experience with Clojure, I believe that my experience with Scheme could shed some light on the question. Compared to other languages that I have worked with, Scheme has been exceptional in that, instead of..
[Clojure] conj 는 왜 list, vector에서 다르게 동작하는가. Clojure 에서 conj 를 쓰는경우 list의 경우 앞에, vector의경우 뒤에 삽입된다. 왜 그런가 궁금했는데 conj 의 경우 해당 데이터타입에 맞는 최적(가장 빠른)의 방법으로 결합(conjoin)된다고 한다. 따라서 리스트의 경우 싱글 링크드 리스트 이기 때문에 가장 앞에 삽입되는것이 가장 빠르고 백터는 일종의 어레이이기때문에 뒤에 삽입되는것이 더 빠르다. 관련 링크. https://medium.com/@greg_63957/conj-cons-concat-oh-my-1398a2981eab Conj, Cons, Concat? Oh my! Lists and collections are the basis of Clojure. But, as a Clojure noob, I was constantly..
[Clojure] clojure 관련 사이트들 2 https://www.braveclojure.com/ Learn to Program the World's Most Bodacious Language with Clojure for the Brave and True Brave Clojure Quests Part of the joy of learning Clojure is learning new ways to think about programming, and then gloating to your colleagues over your new found knowledge. Brave Clojure Quests will provide you with a steady stream of instructional materi www.braveclojure.com 클..
[Clojure] 4Clojure 6 Problem57 (defn problem57 [x] (sort-by #(.indexOf x %) (keys (group-by identity x ) ) ) ) // 마지막 테스트 케이스를 통과하기위해서 sort-by 와 indexOf 를 사용했다. 정확히 https://stackoverflow.com/questions/15498780/why-are-the-result-keys-of-group-by-function-in-order-in-most-cases-but-not-when 이문제.. 나랑 같은 현상때문에 질문이 올라왔고 Larger maps are implemented using hash tables, 라 그렇덴다 ㅜ
[Clojure] 4Clojure 5 #54 Partition a Sequence (fn myfn [num list] (reverse ( (fn [num list result] (if (> num (count list) ) result (recur num (nthrest list num) (conj result (take num list)))) ) num list '() ) ) ) #55 Count Occurrences (fn myfn [list] (zipmap (map first (partition-by identity (sort list) )) (map count (partition-by identity (sort list) )) ) )