Meaning of # in clojureScala vs. Groovy vs. ClojureClojure - named argumentsNon tail-recursive anonymous functions in ClojureHow to make a Clojure function take a variable number of parameters?Clojure vector as function parameterClojure join fails to create a string from the result of filter functionclojure assoc-if and assoc-if-newhow to split a string in clojure not in regular expression modeHow to split string at fixed numbers of character in clojure?How to split string with defining multiple regular expression in clojure?

How to implement a feedback to keep the DC gain at zero for this conceptual passive filter?

Why electric field inside a cavity of a non-conducting sphere not zero?

Yosemite Fire Rings - What to Expect?

Drawing ramified coverings with tikz

On a tidally locked planet, would time be quantized?

How do I find all files that end with a dot

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?

Biological Blimps: Propulsion

How could a planet have erratic days?

What should you do if you miss a job interview (deliberately)?

WiFi Thermostat, No C Terminal on Furnace

What was this official D&D 3.5e Lovecraft-flavored rulebook?

copy and scale one figure (wheel)

Freedom of speech and where it applies

Why did the Mercure fail?

How much character growth crosses the line into breaking the character

Energy measurement from position eigenstate

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Is it safe to use olive oil to clean the ear wax?

Loading commands from file

Not using 's' for he/she/it

The screen of my macbook suddenly broken down how can I do to recover

What if a revenant (monster) gains fire resistance?

"Spoil" vs "Ruin"



Meaning of # in clojure


Scala vs. Groovy vs. ClojureClojure - named argumentsNon tail-recursive anonymous functions in ClojureHow to make a Clojure function take a variable number of parameters?Clojure vector as function parameterClojure join fails to create a string from the result of filter functionclojure assoc-if and assoc-if-newhow to split a string in clojure not in regular expression modeHow to split string at fixed numbers of character in clojure?How to split string with defining multiple regular expression in clojure?













2















In clojure you can create anonymous functions using #



eg



#(+ % 1) 


is a function that takes in a parameter and adds 1 to it.



But we also have to use # for regex
eg



(clojure.string/split "hi, buddy" #",")


Are these two # related?










share|improve this question


























    2















    In clojure you can create anonymous functions using #



    eg



    #(+ % 1) 


    is a function that takes in a parameter and adds 1 to it.



    But we also have to use # for regex
    eg



    (clojure.string/split "hi, buddy" #",")


    Are these two # related?










    share|improve this question
























      2












      2








      2


      1






      In clojure you can create anonymous functions using #



      eg



      #(+ % 1) 


      is a function that takes in a parameter and adds 1 to it.



      But we also have to use # for regex
      eg



      (clojure.string/split "hi, buddy" #",")


      Are these two # related?










      share|improve this question














      In clojure you can create anonymous functions using #



      eg



      #(+ % 1) 


      is a function that takes in a parameter and adds 1 to it.



      But we also have to use # for regex
      eg



      (clojure.string/split "hi, buddy" #",")


      Are these two # related?







      clojure






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 4:27









      AshwinAshwin

      4,5252282147




      4,5252282147






















          4 Answers
          4






          active

          oldest

          votes


















          7














          There are also sets #, fully qualified class name constructors #my.klass_or_type_or_record[:a :b :c], instants #inst "yyyy-mm-ddThh:mm:ss.fff+hh:mm" and some others.



          They are related in a sence that in these cases # starts a sequence recognisible by clojure reader, which dispatches every such instance to an appropriate reader.There's a guide that expands on this.



          I think this convention exists to reduce the number of different syntaxes to just one and thus simplify the reader.






          share|improve this answer
































            3














            The two uses have no (direct) relationship.



            In Clojure, when you see the # symbol, it is a giant clue that you are "talking" to the Clojure Reader, not to the Clojure Compiler. See the full docs on the Reader here: https://clojure.org/reference/reader.



            The Reader is responsible for converting plain text from a source file into a collection of data structures. For example, comparing Clojure to Java we have



            ; Clojure ; Java
            "Hello" => new String( "Hello" )


            and



            [ "Goodbye" "cruel" "world!" ] ; Clojure vector of 3 strings

            ; Java ArrayList of 3 strings
            var msg = new ArrayList<String>();
            msg.add( "Goodbye" );
            msg.add( "cruel" );
            msg.add( "world!" );


            Similarly, there are shortcuts that the Reader recognizes even within Clojure source code (before the compiler converts it to Java bytecode), just to save you some typing. These "Reader Macros" get converted from your "short form" source code into "standard Clojure" even before the Clojure compiler gets started. For example:



            @my-atom => (deref my-atom) ; not using `#`
            #'map => (var map)
            # 1 2 3 => (hash-set 1 2 3)
            #_(launch-missiles 12.3 45.6) => `` ; i.e. "nothing"
            #(+ 1 %) => (fn [x] (+ 1 x))


            and so on. As the @ or deref operator shows, not all Reader Macros use the # (hash/pound/octothorpe) symbol. Note that, even in the case of a vector literal:



            [ "Goodbye" "cruel" "world!" ]


            the Reader creates a result as if you had typed:



            (vector "Goodbye" "cruel" "world!" )





            share|improve this answer
































              0














              Other Lisps have proper programmable readers, and consequently read macros. Clojure doesn't really have a programmable reader - users cannot easily add new read macros - but the Clojure system does internally use read macros. The # read macro is the dispatch macro, the character following the # being a key into a further read macro table.



              So yes, the # does mean something; but it's so deep and geeky that you do not really need to know this.






              share|improve this answer






























                -1















                Are these two # related?




                No, they aren't. The # literal is used in different ways. Some of them you've already mentioned: these are an anonymous function and a regex pattern. Here are some more cases:



                • Prepending an expression with #_ just wipes it from the compiler as it has never been written. For example: #_(/ 0 0) will be ignored on reader level so none of the exception will appear.


                • Tagging primitives to coerce them to complex types, for example #inst "2019-03-09" will produce an instance of java.util.Date class. There are also #uuid and other built-in tags. You may register your own ones.


                • Tagging ordinary maps to coerce them to types maps, e.g. #project.models/User :name "John" :age 42 will produce a map declared as (defrecord User ...).






                share|improve this answer






















                  Your Answer






                  StackExchange.ifUsing("editor", function ()
                  StackExchange.using("externalEditor", function ()
                  StackExchange.using("snippets", function ()
                  StackExchange.snippets.init();
                  );
                  );
                  , "code-snippets");

                  StackExchange.ready(function()
                  var channelOptions =
                  tags: "".split(" "),
                  id: "1"
                  ;
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function()
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled)
                  StackExchange.using("snippets", function()
                  createEditor();
                  );

                  else
                  createEditor();

                  );

                  function createEditor()
                  StackExchange.prepareEditor(
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader:
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  ,
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  );



                  );













                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function ()
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55056725%2fmeaning-of-in-clojure%23new-answer', 'question_page');

                  );

                  Post as a guest















                  Required, but never shown

























                  4 Answers
                  4






                  active

                  oldest

                  votes








                  4 Answers
                  4






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  7














                  There are also sets #, fully qualified class name constructors #my.klass_or_type_or_record[:a :b :c], instants #inst "yyyy-mm-ddThh:mm:ss.fff+hh:mm" and some others.



                  They are related in a sence that in these cases # starts a sequence recognisible by clojure reader, which dispatches every such instance to an appropriate reader.There's a guide that expands on this.



                  I think this convention exists to reduce the number of different syntaxes to just one and thus simplify the reader.






                  share|improve this answer





























                    7














                    There are also sets #, fully qualified class name constructors #my.klass_or_type_or_record[:a :b :c], instants #inst "yyyy-mm-ddThh:mm:ss.fff+hh:mm" and some others.



                    They are related in a sence that in these cases # starts a sequence recognisible by clojure reader, which dispatches every such instance to an appropriate reader.There's a guide that expands on this.



                    I think this convention exists to reduce the number of different syntaxes to just one and thus simplify the reader.






                    share|improve this answer



























                      7












                      7








                      7







                      There are also sets #, fully qualified class name constructors #my.klass_or_type_or_record[:a :b :c], instants #inst "yyyy-mm-ddThh:mm:ss.fff+hh:mm" and some others.



                      They are related in a sence that in these cases # starts a sequence recognisible by clojure reader, which dispatches every such instance to an appropriate reader.There's a guide that expands on this.



                      I think this convention exists to reduce the number of different syntaxes to just one and thus simplify the reader.






                      share|improve this answer















                      There are also sets #, fully qualified class name constructors #my.klass_or_type_or_record[:a :b :c], instants #inst "yyyy-mm-ddThh:mm:ss.fff+hh:mm" and some others.



                      They are related in a sence that in these cases # starts a sequence recognisible by clojure reader, which dispatches every such instance to an appropriate reader.There's a guide that expands on this.



                      I think this convention exists to reduce the number of different syntaxes to just one and thus simplify the reader.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Mar 8 at 12:18









                      l0st3d

                      2,03212028




                      2,03212028










                      answered Mar 8 at 5:26









                      akondakond

                      12.5k32849




                      12.5k32849























                          3














                          The two uses have no (direct) relationship.



                          In Clojure, when you see the # symbol, it is a giant clue that you are "talking" to the Clojure Reader, not to the Clojure Compiler. See the full docs on the Reader here: https://clojure.org/reference/reader.



                          The Reader is responsible for converting plain text from a source file into a collection of data structures. For example, comparing Clojure to Java we have



                          ; Clojure ; Java
                          "Hello" => new String( "Hello" )


                          and



                          [ "Goodbye" "cruel" "world!" ] ; Clojure vector of 3 strings

                          ; Java ArrayList of 3 strings
                          var msg = new ArrayList<String>();
                          msg.add( "Goodbye" );
                          msg.add( "cruel" );
                          msg.add( "world!" );


                          Similarly, there are shortcuts that the Reader recognizes even within Clojure source code (before the compiler converts it to Java bytecode), just to save you some typing. These "Reader Macros" get converted from your "short form" source code into "standard Clojure" even before the Clojure compiler gets started. For example:



                          @my-atom => (deref my-atom) ; not using `#`
                          #'map => (var map)
                          # 1 2 3 => (hash-set 1 2 3)
                          #_(launch-missiles 12.3 45.6) => `` ; i.e. "nothing"
                          #(+ 1 %) => (fn [x] (+ 1 x))


                          and so on. As the @ or deref operator shows, not all Reader Macros use the # (hash/pound/octothorpe) symbol. Note that, even in the case of a vector literal:



                          [ "Goodbye" "cruel" "world!" ]


                          the Reader creates a result as if you had typed:



                          (vector "Goodbye" "cruel" "world!" )





                          share|improve this answer





























                            3














                            The two uses have no (direct) relationship.



                            In Clojure, when you see the # symbol, it is a giant clue that you are "talking" to the Clojure Reader, not to the Clojure Compiler. See the full docs on the Reader here: https://clojure.org/reference/reader.



                            The Reader is responsible for converting plain text from a source file into a collection of data structures. For example, comparing Clojure to Java we have



                            ; Clojure ; Java
                            "Hello" => new String( "Hello" )


                            and



                            [ "Goodbye" "cruel" "world!" ] ; Clojure vector of 3 strings

                            ; Java ArrayList of 3 strings
                            var msg = new ArrayList<String>();
                            msg.add( "Goodbye" );
                            msg.add( "cruel" );
                            msg.add( "world!" );


                            Similarly, there are shortcuts that the Reader recognizes even within Clojure source code (before the compiler converts it to Java bytecode), just to save you some typing. These "Reader Macros" get converted from your "short form" source code into "standard Clojure" even before the Clojure compiler gets started. For example:



                            @my-atom => (deref my-atom) ; not using `#`
                            #'map => (var map)
                            # 1 2 3 => (hash-set 1 2 3)
                            #_(launch-missiles 12.3 45.6) => `` ; i.e. "nothing"
                            #(+ 1 %) => (fn [x] (+ 1 x))


                            and so on. As the @ or deref operator shows, not all Reader Macros use the # (hash/pound/octothorpe) symbol. Note that, even in the case of a vector literal:



                            [ "Goodbye" "cruel" "world!" ]


                            the Reader creates a result as if you had typed:



                            (vector "Goodbye" "cruel" "world!" )





                            share|improve this answer



























                              3












                              3








                              3







                              The two uses have no (direct) relationship.



                              In Clojure, when you see the # symbol, it is a giant clue that you are "talking" to the Clojure Reader, not to the Clojure Compiler. See the full docs on the Reader here: https://clojure.org/reference/reader.



                              The Reader is responsible for converting plain text from a source file into a collection of data structures. For example, comparing Clojure to Java we have



                              ; Clojure ; Java
                              "Hello" => new String( "Hello" )


                              and



                              [ "Goodbye" "cruel" "world!" ] ; Clojure vector of 3 strings

                              ; Java ArrayList of 3 strings
                              var msg = new ArrayList<String>();
                              msg.add( "Goodbye" );
                              msg.add( "cruel" );
                              msg.add( "world!" );


                              Similarly, there are shortcuts that the Reader recognizes even within Clojure source code (before the compiler converts it to Java bytecode), just to save you some typing. These "Reader Macros" get converted from your "short form" source code into "standard Clojure" even before the Clojure compiler gets started. For example:



                              @my-atom => (deref my-atom) ; not using `#`
                              #'map => (var map)
                              # 1 2 3 => (hash-set 1 2 3)
                              #_(launch-missiles 12.3 45.6) => `` ; i.e. "nothing"
                              #(+ 1 %) => (fn [x] (+ 1 x))


                              and so on. As the @ or deref operator shows, not all Reader Macros use the # (hash/pound/octothorpe) symbol. Note that, even in the case of a vector literal:



                              [ "Goodbye" "cruel" "world!" ]


                              the Reader creates a result as if you had typed:



                              (vector "Goodbye" "cruel" "world!" )





                              share|improve this answer















                              The two uses have no (direct) relationship.



                              In Clojure, when you see the # symbol, it is a giant clue that you are "talking" to the Clojure Reader, not to the Clojure Compiler. See the full docs on the Reader here: https://clojure.org/reference/reader.



                              The Reader is responsible for converting plain text from a source file into a collection of data structures. For example, comparing Clojure to Java we have



                              ; Clojure ; Java
                              "Hello" => new String( "Hello" )


                              and



                              [ "Goodbye" "cruel" "world!" ] ; Clojure vector of 3 strings

                              ; Java ArrayList of 3 strings
                              var msg = new ArrayList<String>();
                              msg.add( "Goodbye" );
                              msg.add( "cruel" );
                              msg.add( "world!" );


                              Similarly, there are shortcuts that the Reader recognizes even within Clojure source code (before the compiler converts it to Java bytecode), just to save you some typing. These "Reader Macros" get converted from your "short form" source code into "standard Clojure" even before the Clojure compiler gets started. For example:



                              @my-atom => (deref my-atom) ; not using `#`
                              #'map => (var map)
                              # 1 2 3 => (hash-set 1 2 3)
                              #_(launch-missiles 12.3 45.6) => `` ; i.e. "nothing"
                              #(+ 1 %) => (fn [x] (+ 1 x))


                              and so on. As the @ or deref operator shows, not all Reader Macros use the # (hash/pound/octothorpe) symbol. Note that, even in the case of a vector literal:



                              [ "Goodbye" "cruel" "world!" ]


                              the Reader creates a result as if you had typed:



                              (vector "Goodbye" "cruel" "world!" )






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Mar 8 at 20:13

























                              answered Mar 8 at 15:10









                              Alan ThompsonAlan Thompson

                              14.2k22534




                              14.2k22534





















                                  0














                                  Other Lisps have proper programmable readers, and consequently read macros. Clojure doesn't really have a programmable reader - users cannot easily add new read macros - but the Clojure system does internally use read macros. The # read macro is the dispatch macro, the character following the # being a key into a further read macro table.



                                  So yes, the # does mean something; but it's so deep and geeky that you do not really need to know this.






                                  share|improve this answer



























                                    0














                                    Other Lisps have proper programmable readers, and consequently read macros. Clojure doesn't really have a programmable reader - users cannot easily add new read macros - but the Clojure system does internally use read macros. The # read macro is the dispatch macro, the character following the # being a key into a further read macro table.



                                    So yes, the # does mean something; but it's so deep and geeky that you do not really need to know this.






                                    share|improve this answer

























                                      0












                                      0








                                      0







                                      Other Lisps have proper programmable readers, and consequently read macros. Clojure doesn't really have a programmable reader - users cannot easily add new read macros - but the Clojure system does internally use read macros. The # read macro is the dispatch macro, the character following the # being a key into a further read macro table.



                                      So yes, the # does mean something; but it's so deep and geeky that you do not really need to know this.






                                      share|improve this answer













                                      Other Lisps have proper programmable readers, and consequently read macros. Clojure doesn't really have a programmable reader - users cannot easily add new read macros - but the Clojure system does internally use read macros. The # read macro is the dispatch macro, the character following the # being a key into a further read macro table.



                                      So yes, the # does mean something; but it's so deep and geeky that you do not really need to know this.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Mar 10 at 17:55









                                      Simon BrookeSimon Brooke

                                      10336




                                      10336





















                                          -1















                                          Are these two # related?




                                          No, they aren't. The # literal is used in different ways. Some of them you've already mentioned: these are an anonymous function and a regex pattern. Here are some more cases:



                                          • Prepending an expression with #_ just wipes it from the compiler as it has never been written. For example: #_(/ 0 0) will be ignored on reader level so none of the exception will appear.


                                          • Tagging primitives to coerce them to complex types, for example #inst "2019-03-09" will produce an instance of java.util.Date class. There are also #uuid and other built-in tags. You may register your own ones.


                                          • Tagging ordinary maps to coerce them to types maps, e.g. #project.models/User :name "John" :age 42 will produce a map declared as (defrecord User ...).






                                          share|improve this answer



























                                            -1















                                            Are these two # related?




                                            No, they aren't. The # literal is used in different ways. Some of them you've already mentioned: these are an anonymous function and a regex pattern. Here are some more cases:



                                            • Prepending an expression with #_ just wipes it from the compiler as it has never been written. For example: #_(/ 0 0) will be ignored on reader level so none of the exception will appear.


                                            • Tagging primitives to coerce them to complex types, for example #inst "2019-03-09" will produce an instance of java.util.Date class. There are also #uuid and other built-in tags. You may register your own ones.


                                            • Tagging ordinary maps to coerce them to types maps, e.g. #project.models/User :name "John" :age 42 will produce a map declared as (defrecord User ...).






                                            share|improve this answer

























                                              -1












                                              -1








                                              -1








                                              Are these two # related?




                                              No, they aren't. The # literal is used in different ways. Some of them you've already mentioned: these are an anonymous function and a regex pattern. Here are some more cases:



                                              • Prepending an expression with #_ just wipes it from the compiler as it has never been written. For example: #_(/ 0 0) will be ignored on reader level so none of the exception will appear.


                                              • Tagging primitives to coerce them to complex types, for example #inst "2019-03-09" will produce an instance of java.util.Date class. There are also #uuid and other built-in tags. You may register your own ones.


                                              • Tagging ordinary maps to coerce them to types maps, e.g. #project.models/User :name "John" :age 42 will produce a map declared as (defrecord User ...).






                                              share|improve this answer














                                              Are these two # related?




                                              No, they aren't. The # literal is used in different ways. Some of them you've already mentioned: these are an anonymous function and a regex pattern. Here are some more cases:



                                              • Prepending an expression with #_ just wipes it from the compiler as it has never been written. For example: #_(/ 0 0) will be ignored on reader level so none of the exception will appear.


                                              • Tagging primitives to coerce them to complex types, for example #inst "2019-03-09" will produce an instance of java.util.Date class. There are also #uuid and other built-in tags. You may register your own ones.


                                              • Tagging ordinary maps to coerce them to types maps, e.g. #project.models/User :name "John" :age 42 will produce a map declared as (defrecord User ...).







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Mar 8 at 8:11









                                              Ivan GrishaevIvan Grishaev

                                              1,041611




                                              1,041611



























                                                  draft saved

                                                  draft discarded
















































                                                  Thanks for contributing an answer to Stack Overflow!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid


                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.

                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function ()
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55056725%2fmeaning-of-in-clojure%23new-answer', 'question_page');

                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

                                                  Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

                                                  How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page