Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7746349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:15:24+00:00 2026-06-01T10:15:24+00:00

How do I call a function in one Clojure namespace, bene-csv.core from another namespace,

  • 0

How do I call a function in one Clojure namespace, bene-csv.core from another namespace, bene-cmp.core? I’ve tried various flavors of :require and :use with no success.

Here is the function in bene-csv:

(defn ret-csv-data
    "Returns a lazy sequence generated by parse-csv.
     Uses open-csv-file which will return a nil, if
     there is an exception in opening fnam.

     parse-csv called on non-nil file, and that
     data is returned."

    [fnam]
    (let [  csv-file (open-csv-file fnam)
            csv-data (if-not (nil? csv-file)
                         (parse-csv csv-file)
                         nil)]
            csv-data))

Here is the header of bene-cmp.core:

(ns bene-cmp.core
   .
   .
   .
  (:gen-class)
  (:use [clojure.tools.cli])
  (:require [clojure.string :as cstr])
  (:use bene-csv.core)
  (:use clojure-csv.core)
  .
  .
  .

The calling function — currently a stub — in (bene-cmp.core)

defn fetch-csv-data
    "This function merely loads the two csv file arguments."

    [benetrak-csv-file gic-billing-file]
        (let [benetrak-csv-data ret-csv-data]))

If I modify the header of bene-cmp.clj

 (:require [bene-csv.core :as bcsv])

and change the call to ret-csv-data

(defn fetch-csv-data
    "This function merely loads the two csv file arguments."

    [benetrak-csv-file gic-billing-file]
        (let [benetrak-csv-data bcsv/ret-csv-data]))

I get this error

Caused by: java.lang.RuntimeException: No such var: bcsv/ret-csv-data

So, how do I call fetch-csv-data?
Thank You.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:15:25+00:00Added an answer on June 1, 2026 at 10:15 am

    You need to invoke the function, not just reference the var.

    If you have this in your ns:

    (:require [bene-csv.core :as bcsv])
    

    Then you need to put parentheses around the namespace/alias qualified var to invoke it:

    (let [benetrak-csv-data (bcsv/ret-csv-data arg)]
      ; stuff
      )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to call a function from one Module to another? I have
Actually i want to call a function of one activity from another activity..i write
How to do it? Is it possible to call a function from one F#
I am using JNI to call my C++ function from Java. One of the
Can I call public method from within private one: var myObject = function() {
One of my C# Winforms applications randomly displays a pure virtual function call message
How can one call a ColdFusion function, passing in attribute values as arguments, inside
How do you call function lol() from outside the $(document).ready() for example: $(document).ready(function(){ function
we need run one function periodically in Java web application . How to call
I am asking myself how to call a function only one time per week

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.