<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions in Beginner</title>
<link>https://ask.clojure.org/index.php/questions/beginner</link>
<description>Powered by Question2Answer</description>
<item>
<title>Trying to extract vec from vec - conj not working?</title>
<link>https://ask.clojure.org/index.php/14838/trying-to-extract-vec-from-vec-conj-not-working</link>
<description>&lt;p&gt;I&#039;m trying to define a function that will extract a shorter vector from a longer vector. Here is the code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn vfromv [v1 v2 start stop] 
    (loop [i start] 
      (if (&amp;gt; i stop)
        &quot;Stop-val exceeded&quot;
          (do
            (conj v2 (get v1 i))
            (println i)
            (println (get v1 i))
            (if (&amp;gt; i 0) (println (get v2 i)))
            (println v2)
            (recur (inc i))))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Calling the function:&lt;br&gt;
(vfromv [0 1 2 3 4 5 6 7 8 9] [] 2 6)&lt;/p&gt;
&lt;p&gt; gives the repl output:&lt;br&gt;
2&lt;br&gt;
2&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
3&lt;br&gt;
3&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
4&lt;br&gt;
4&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
5&lt;br&gt;
5&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
6&lt;br&gt;
6&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
&quot;Stop-val exceeded&quot;&lt;/p&gt;
&lt;p&gt;It looks like the conj function isn&#039;t working but I can&#039;t see why.&lt;/p&gt;
&lt;p&gt;Can anyone help me understand why this isn&#039;t working?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description>
<category>Beginner</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14838/trying-to-extract-vec-from-vec-conj-not-working</guid>
<pubDate>Mon, 15 Dec 2025 01:53:12 +0000</pubDate>
</item>
<item>
<title>Can you help me choosing a book?</title>
<link>https://ask.clojure.org/index.php/14693/can-you-help-me-choosing-a-book</link>
<description>&lt;p&gt;Greetings,&lt;br&gt;
so I decided to learn Clojure, my background is Erlang. I am not working anymore in the IT industry.&lt;/p&gt;
&lt;p&gt;I want to learn Clojure for fun, in my spare time, and I love to use books for that.&lt;br&gt;
I love to build small projects while learning, not just theory.&lt;br&gt;
I see there are trillions of books, and I know it is a very subjective matter.&lt;/p&gt;
&lt;p&gt;I am looking for one good for beginners, and with a practical approach.&lt;br&gt;
Can you recommend one?&lt;/p&gt;
&lt;p&gt;I love &quot;Clojure for the Brave and True&quot;&#039;s title and cover, and it also seems to build a project.&lt;/p&gt;
&lt;p&gt;Is that book still good in 2025?&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
</description>
<category>Beginner</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14693/can-you-help-me-choosing-a-book</guid>
<pubDate>Tue, 26 Aug 2025 14:58:42 +0000</pubDate>
</item>
<item>
<title>How to call a function in another ns in lein repl?</title>
<link>https://ask.clojure.org/index.php/14330/how-to-call-a-function-in-another-ns-in-lein-repl</link>
<description>&lt;p&gt;Clojure beginner here.&lt;/p&gt;
&lt;p&gt;I&#039;ve created a leiningen project &quot;adventofcode&quot; and I&#039;ve created a file &quot;src/adventofcode/2024/day7.clj&quot; with this namespace:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns adventofcode.2024.day7
  (:gen-class)
  (:require
    [clojure.math]
    [clojure.math.combinatorics]
    [clojure.pprint]))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now when I run &lt;code&gt;lein repl&lt;/code&gt; the prompt is &lt;code&gt;adventofcode.core&lt;/code&gt;. How can I call a function in the file above? Or switch to the namespace &lt;code&gt;adventofcode.2024&lt;/code&gt;? Tab completion suggests that this namespace doesn&#039;t exist. Do I manually have to load the file somehow?&lt;/p&gt;
&lt;p&gt;I&#039;m just starting out. If I&#039;m making my life unnecessarily hard with this project structure I wouldn&#039;t mind a comment on that too.&lt;/p&gt;
</description>
<category>Beginner</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14330/how-to-call-a-function-in-another-ns-in-lein-repl</guid>
<pubDate>Sat, 11 Jan 2025 23:30:45 +0000</pubDate>
</item>
<item>
<title>Is learning java necessary before diving into clojure?</title>
<link>https://ask.clojure.org/index.php/14311/is-learning-java-necessary-before-diving-into-clojure</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I&#039;ve been advised that learning Java is necessary before diving into Clojure. However, my primary goal is to avoid Java altogether, not to master it. Isn&#039;t it counterproductive to become proficient in Java first just to learn Clojure?&lt;/p&gt;
&lt;p&gt;Comparatively, learning Java first feels like navigating an ocean (Java) just to reach a small archipelago (Clojure). Java is vast and verbose, and mastering it can take years, not just a few months. &lt;/p&gt;
&lt;p&gt;Is it possible to effectively learn Clojure without a deep understanding of Java? Any tips or resources to achieve this?&lt;/p&gt;
&lt;p&gt;Because of this dilemma, I am reconsidering whether to continue learning clojure or switch to another one.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
</description>
<category>Beginner</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14311/is-learning-java-necessary-before-diving-into-clojure</guid>
<pubDate>Wed, 25 Dec 2024 08:01:19 +0000</pubDate>
</item>
</channel>
</rss>