I have some questions, can anybody show how to solve them?
1)How to count elements of list specific to level, independently of sort Exrp? Just like the number of elements subset. for example {{1,2,3,4,5},{5,6,7,8,9}} , at level 1 it should yield 10. I ve been trying to done this by Count[] , but it dont work so even if i choose pattern _ (i can count them separately specifying pattern, but i cant use multi-pattern (see below) , if i specifying _ then it count some lists above target level).
2)How i can assert something like NumberQ or EvenQ to content of list using list as function argument (ie list must contain specific mathematica expr. ) and how to create multi pattern like( f[x_List?NumberQ or EvenQ,y_List?NumberQ or EvenQ]
Thanks.
Length@Flatten@{{1, 2, 3, 4, 5}, {5, 6, 7, 8, 9}}orLength /@ {{1, 2, 3, 4, 5}, {5, 6, 7, 8, 9}}- 681234Count[#, _Integer, 2] & /@ {{1, 2, 3, 4, 5}, {5, 6, 7, 8, 9}}orCount[#, _Integer, 2] & @ {{1, 2, 3, 4, 5}, {5, 6, 7, 8, 9}}- 681234Count[#, _Integer | _Real | _String, 2] & /@ {{1, 2.2, "hello", 4, 5}, {5, 6, 7, 8, 9}}? Do you know about this site ? - 681234