Comments (4)
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.
Could you post the code that's causing the problem? A segfault might be a problem in something else.
from pharen.
(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.
(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)
- Passing anonymous function (php 5.3) HOT 3
- Function argument types HOT 3
- test func_calls not pass HOT 2
- problem with array (Update: discussion on vectors) HOT 9
- Deploying Pharen to a server HOT 1
- Defining namespaces break compilation inside macros
- Missing "use" keyword for Plambdas HOT 2
- Installation in Windows HOT 1
- Form handling - example from Quick Tutorial HOT 4
- Developer's machine-specific paths are in distribution HOT 1
- Basic web site example with Pharen - invitation HOT 1
- (load file) is broken for more than one level (load file 1(load file 2 (load file 3))) for a once off compile
- Lexical::init_closure(naming) is unexpected when (load file) is used
- URLs aren't going to where is intended. HOT 1
- Compile errors HOT 2
- Can't find in docs, how do I define a top level namespace? Also optional function args? HOT 5
- http://www.pharen.org/repl.html throws 404
- I want to remove Partial application
- Repl return 404 HOT 1
- How do I define a macro separately in a .phn file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pharen.