Created
June 4, 2013 23:09
-
-
Save bradland/5710400 to your computer and use it in GitHub Desktop.
Language for working with bid data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The only operators available would be basic arithmetic (+, -, /, *), modulo, | |
# and parenthesis for grouping. The variables bid, weight, and adjustment | |
# would be passed in to the DSL scope. Users can define and assign their own | |
# variables, but these would be limited to local scope within the DSL only. | |
# Percentage weighting | |
bid * (weight * 0.01) | |
# Percentage weighting with adjustment | |
(bid * (weight * 0.01)) + adjustment | |
# Markup weighting | |
weight + (weight * (bid * 0.01)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment