Advertisement
Guest User

Untitled

a guest
Oct 1st, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. diff --git a/expreduce/builtin_functional.go b/expreduce/builtin_functional.go
  2. index a5edcc8..998e27a 100644
  3. --- a/expreduce/builtin_functional.go
  4. +++ b/expreduce/builtin_functional.go
  5. @@ -39,7 +39,7 @@ func parseSymbol(part Ex) (symbol *Symbol, isSymbol bool) {
  6. func parseInfinity(part Ex, es *EvalState) bool {
  7. symbol, isSymbol := parseSymbol(part)
  8. if isSymbol {
  9. - return symbol.IsEqual(&Symbol{"System`Infinity"}, &es.CASLogger) == "EQUAL_TRUE"
  10. + return symbol.IsEqual(NewSymbol("System`Infinity"), &es.CASLogger) == "EQUAL_TRUE"
  11. }
  12. return false
  13. }
  14. @@ -48,9 +48,9 @@ func parseNegativeInfinity(part Ex, es *EvalState) bool {
  15. expr, isExpr := parseExpression(part)
  16. if isExpr {
  17. template := NewExpression([]Ex{
  18. - &Symbol{"System`Times"},
  19. - &Integer{big.NewInt(-1)},
  20. - &Symbol{"System`Infinity"},
  21. + NewSymbol("System`Times"),
  22. + NewInt(-1),
  23. + NewSymbol("System`Infinity"),
  24. })
  25. return expr.IsEqual(template, &es.CASLogger) == "EQUAL_TRUE"
  26. }
  27. @@ -135,7 +135,7 @@ func parseLevelSpec(this Ex, es *EvalState) levelSpec{
  28. }
  29.  
  30. //If the head of the expression is not List, return false
  31. - expression, isList := headExAssertion(expression, &Symbol{"System`List"}, &es.CASLogger)
  32. + expression, isList := headExAssertion(expression, NewSymbol("System`List"), &es.CASLogger)
  33. if !isList {
  34. return levelSpec{false, false, 1, 1, false}
  35. }
  36. @@ -285,7 +285,7 @@ func wrapWithHead(head Ex, expr Ex, partList []int64) *Expression {
  37. }
  38.  
  39. func wrapWithHeadIndexed(head Ex, expr Ex, partList []int64) *Expression {
  40. - partSpec := []Ex{&Symbol{"System`List"}}
  41. + partSpec := []Ex{NewSymbol("System`List")}
  42. for _, part := range partList {
  43. partSpec = append(partSpec, NewInt(part))
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement