Giter Site home page Giter Site logo

Problem with WHEN macro about pharen HOT 4 CLOSED

scriptor avatar scriptor commented on September 3, 2024
Problem with WHEN macro

from pharen.

Comments (4)

 avatar commented on September 3, 2024

Ok, I just tried to replace it with COND and appears that causes a segmentation fault. I think it's a problem with tail recursion but I'm not sure...

from pharen.

Scriptor avatar Scriptor commented on September 3, 2024

Could you post the code that's causing the problem? A segfault might be a problem in something else.

from pharen.

 avatar commented on September 3, 2024
(class Mage-Checkout-Block-Links
    (access private
        (when addLink (text type width css-class)
        (let [parent-block (-> this getParentBlock)]
          (if parent-block
              (-> parent-block addLink text type text TRUE (array) width
              (. "class=\"top-link-" css-class "\""))))))
    (fn addCartLink ()
    (let [count (-> (-> this helper "checkout/cart") getSummaryCount)]
      (-> this addLink
          (cond ((== count 1) (-> this __ "My Cart (%s item)" count))
            ((> count 0) (-> this __ "My Cart (%s items)" count))
            (TRUE (-> this __ "My Cart")))
          "checkout/cart" 50 "cart"))
    this)
    (fn addCheckoutLink ()
    (when (-> (-> this helper "checkout") canOnepageCheckout)
        (-> this addLink (-> this __ "Checkout") "checkout" 60 "checkout")))
)

from pharen.

 avatar commented on September 3, 2024
(fn print-messages (type)
    (print (if (> (-> messageStack type) 0)
           (-> messageStack output type)
           "")))

(print (-> payment-modules javascript-validation))

(print "div class\"centerColumn\" id=\"checkoutPayment\">")
(print (zen-draw-form "checkout_payment"
              (zen-href-link FILENAME-CHECKOUT-CONFIRMATION "" "SSL")
              "post" (if flagOnSubmit "onsubmit=\"return check_form();\"" "")))
(print (. "<h1>" HEADING-TITLE "</h1>"))
(print-messages "redemptions")
(print-messages "checkout")
(print-messages "checkout_payment")

(if (not (-> payment-modules in-special-checkout))
    (include "paypal_express_checkout.php"))

from pharen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.