Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
As i know, pure functions return the value that you insert in. However, log do also the same thing as for example finding sin(x). Why log is considered impure
Read haha some articles
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 11 months ago.
Improve this question
How to do 50% of 120 in scala code..need proper syntax ,& runnable code for same.
Eg :
int k = (int)(120*(50.0f/100.0f));
This is in java need scala code for same.
The answer would be:
(120*(50.0f/100.0f)).toInt
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
List like this:[1,[2,3,4]]
Remove the first element of sub-list which is 2,
Result like this:[1,[3,4]]
This should get you an idea of how to do it:
rem_sublist_first([], []).
rem_sublist_first([X|Y], [X|Y2]):-
\+ X = [_|_],
rem_sublist_first(Y, Y2).
rem_sublist_first([[_|Y1]|Y2], [Y1|Y3]):-
rem_sublist_first(Y2, Y3).
test:-
rem_sublist_first([1,[2,3,4]], [1,[3,4]]),
rem_sublist_first([1,2,3,[4,5,6]], [1,2,3,[5,6]]).
I advise you to study prolog lists, they are essential for any type of prolog program so it is a worth investment if you are goind to write prolog code.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
It would be fine for me if the code below returned true.
Since it has not, what are the best uses for this feature? What am I missing?
a := 10.52i
b := 10i
fmt.Println(a == b)
//false
Based on #Tashi, #Arkku and #axiac's comments, I realized that I am missing Math knowledge to understand this feature.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Say, for example, Σ={x,y}.
And you carried out the operation Σ*-x. What would be the resulting language? Would it essentially be y* or would it just minus one occurrence of x in all strings generated in Σ*?
i.e xxyyxx to xyyxx.
It would be the language of all strings generated by Σ* minus the string x. (so: xx, epsilon, xyx, y, etc... but not x)